ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <bourbaki@bigfoot.com>
Subject: More font problems --- encoding errors
Date: Wed, 26 Dec 2001 16:44:38 +0100	[thread overview]
Message-ID: <18511792590.20011226164438@bigfoot.com> (raw)

Hello,

still testing the use of non-CMR fonts in ConTeXt ... if you
recall I was using

\setupencoding[default=8r]
\usetypescript[berry][8r]
\setupbodyfont[pos]

\useregime[il1]

And everything appeared to work correctly (apart from the [sans]
instead of [mono] error in courier). Now I discovered that
\useregime was doing nothing --or rather, it didn't really
*enable* the regime. So I switched to \enableregime. And voilá, I
found a bug. Try the following text:

\def\text{«Questa è una prova per l'uso delle lettere accentate,
 e devo proprio dire che pare funzionare. Perciò i
 problemi che tu sembri avere non sono presenti nel
 mio sistema. Perché? Cosa c'è di diverso nelle nostre
 installazioni? Di più non posso dire.»}

\text

without \enableregime; it works correctly (accented letters have
accents, guillemots are taken from the font). Now try it WITH
enableregime: in my installation this removes the accents from the
letters (accents not found) and the guillemots are fake (taken
from the math font).

My limited debug showed that:

(1) encoding 8r (from enco-tbo.tex) does NOT define leftguillemot
and rightguillemot (they are there at positions 171 and 187)

(2) if I add an \enableencoding[8r][main] *after* setting up the
bodyfont, I get the accented letters (but because of (1) I don't
get real guillemots); yet the encoding gets reset when changing
font (e.g. when switching to \tt or \ss).

Is this WAD (Working As Designed) or a bug? Shouldn't the encoding
be tied to the font?

Ok, I think I found the problem: in the berry font definitions, if
I add [encoding=8r] to each of the definefontsynonym line I get
the correct result. I assume this has to be done for the ec
variant as well. So the question is: shouldn't the synonyms get the
same properties as the other when not overriden? I mean: consider
for example:

\definefontsynonym [Times-Roman]       [\typefaceencoding-utmr8a]  [encoding=\typefaceencoding]
(called with typefaceencoding=8r)
\definefontsynonym [8r-utmr8a]                 [ptmr8r]

Shouldn't in the end the ptmr8r be called with the encoding 8r
defined in the previous synonym?

Now, regarding problem (1): how do I force ConTeXt to get the
guillemots from the font? In a rather more general context (;->) I
figure the error resides in defining a mappable character (the
guillemots) in raw mode. Instead, \leftguillemot and
\rightguillemot should follow encoding mappings; this should also
be true, for example for subguillemots, and more in general for
other characters as well.

As a temporary patch I have

\let\leftguillemot\undefined
\let\rightguillemot\undefined

\startencoding[default]

\definecharacter leftguillemot {\dontleavehmode\hbox{\raise.25ex\hbox{$\scriptscriptstyle\ll$}}}
\definecharacter rightguillemot {\hbox{\raise.25ex\hbox{$\scriptscriptstyle\gg$}}}

\stopencoding

\startencoding[8r]

\definecharacter leftguillemot 171
\definecharacter rightguillemot 183

\stopencoding

in my cont-loc.tex file.

--
Giuseppe "Oblomov" Bilotta


             reply	other threads:[~2001-12-26 15:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-26 15:44 Giuseppe Bilotta [this message]
2001-12-27 13:27 ` Hans Hagen
2001-12-28  9:48   ` Re[2]: " Giuseppe Bilotta
2001-12-28 21:35   ` Giuseppe Bilotta
2001-12-29 11:32     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18511792590.20011226164438@bigfoot.com \
    --to=bourbaki@bigfoot.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).