ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* More font problems --- encoding errors
@ 2001-12-26 15:44 Giuseppe Bilotta
  2001-12-27 13:27 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Bilotta @ 2001-12-26 15:44 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-12-29 11:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-26 15:44 More font problems --- encoding errors Giuseppe Bilotta
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

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).