[Fontinst] Re: Bug in fontinstversion{1.927}

Lars Hellström Lars.Hellstrom at math.umu.se
Sun Jan 30 16:25:51 CET 2005


At 22.05 +0100 2005-01-27, Peter Dyballa wrote:
>It's no problem for me to write that I do not understand (now or in
>future) what you wrote,

It sometimes happens that the reason a student fails to understand
something is that (s)he spends too much time asking and not enough time
studying the available literature. :-)

>it's a bit too far away from my experience and
>my understanding. Isn't this statement doing the translation I
>mentioned before:
>
>	\ifisglyph{afii61352}\then              \setglyph{numero}
>\glyph{afii61352}{1000} \endsetglyph \Fi

This selects a glyph by name, not by its slot in some encoding.

>If there is an "u" take it for an "x." Or am I wrong again? In German
>'errare masculinum est' sounds very comfortable. At least to me.

"To err is male"?  Or maybe "To err is masculine"?

>Am 27.01.2005 um 19:35 schrieb Lars Hellström:
>
>> It could well be that ttf2pt1 is a bit of a Platonic cave-dweller in
>> this
>> respect; I don't know for sure as I don't know what it does in detail.
>
>ttf2pt is instructed from statements like these:
>
>	=01     U+0393  GREEK CAPITAL LETTER GAMMA
>	=02     U+0394  GREEK CAPITAL LETTER DELTA
>	=03     U+0398  GREEK CAPITAL LETTER THETA
>
>It excerpts (and re-writes) the programme for the glyph at the
>specified Unicode position and when assembling the new font puts it
>into slot #<from column 1>. The corresponding AFM file reports this,
>plus the measures of the box into which glyph fits.

Well, the details I thought of would be at a lower level, but the above
will serve to make my point, since your description is indeed in terms of
the "shadows" (whether that is because ttf2pt1 wasn't written with the true
thing in mind or simply because it was meant to be user-friendly I cannot
say).

First, there is no "glyph at the specified Unicode position", there is a
glyph that would be _selected_ for the particular Unicode character.
(Several characters may be mapped to the same glyph, and there may be many
glyphs for a single character. This simply chooses one of them, according
to some rule.)

Second, the new font is not "assembled by putting this glyph into slot
#<from column 1>". In the assembled font, the glyph has an entry in the
CharStrings dictionary, and the key for that entry will henceforth be the
name of that glyph in that font. The sense in which the glyph is in a
particular slot is _only_ that the _name_ of that glyph appears in that
slot in the default encoding vector of the font.

Both on the TTF and the PT1 sides, the real things are the glyphs. The
methods through which we access glyphs sometimes distort our (fontinst's)
perception of them, but then we should be aware of and work around these
distortions. Selecting glyphs by Unicode character is even at best an
imperfect mechanism, so there are tasks at which it will fail. (Cf. the
tex-fonts list posting on ttf2afm by Laurent SIEBENMANN recently.)

And, to reiterate, I think \reglyphfont can do what you wanted
\translatefont to do, even though it doesn't quite have the interface you
imagined.

Lars Hellström




More information about the fontinst mailing list