[Fontinst] Re: Bug in fontinstversion{1.927}

Lars Hellström Lars.Hellstrom at math.umu.se
Fri Feb 4 22:59:28 CET 2005


At 12.38 +0100 2005-02-02, Peter Dyballa wrote:
>Am 31.01.2005 um 20:04 schrieb Lars Hellström:
>
>> At 13.40 +0100 2005-01-31, Peter Dyballa wrote:
>>> Am 30.01.2005 um 16:25 schrieb Lars Hellström:
>
>>>  The fontinst names are descriptions of glyph shapes, whereas the
>>> Unicode
>> standard is very explicit that its characters are _not_.
>
>Sorry, I really can't understand what you are trying to express again!
>Could you put in some different words?

I'm getting rather bored of explaining this to you, but here is a quote from
  http://www.adobe.com/type/browser/pdfs/OTGuide.pdf
where Adobe tries to explain it.

  Characters and Glyphs

  The distinction between characters and glyphs is central
  to a discussion of advanced OpenType layout feature
  support. Characters are the code points assigned by the
  Unicode standard, which represent the smallest semantic
  units of language, such as letters. Glyphs are the specific
  forms or shapes that those characters can take in a font.

  A key point is that one character may be represented by
  any of several different glyphs. For example, lowercase
  "a", small cap "a" and an alternate swash lowercase "a" are
  all the same character---namely the lowercase "a"---but
  they are three separate glyphs.

  Additionally, although the relationship between glyphs
  and characters is often one-to-one, it may be many-to-one,
  one-to-many, or many-to-many. For example, sometimes
  several characters may be represented by one glyph, as in
  the case of the "ffi" ligature, which corresponds
  to a sequence of three characters: f, f and i.
  Alternately, one character may be represented by several
  glyphs. For example, "é" is often considered a single
  character, but might be assembled on the fly from separate
  glyphs for the base character and the accent.

>> Internally in fontinst, glyph names are just like variable names and
>> can be
>> changed however one likes
>
>So there is no risk to take a Perl script

(Taking a Perl script generally places you in risk: the risk of obfuscation!)

>and make those deviating
>glyph names in the 8p AFM file or the created MTX files become those in
>fontinst known and used. Or am I wrong again?

If you reencode, then the names in the AFM _need_ to match the names in the
PFB (unless the ETX similarly mismatches the ENC).

>>  As far as things one does at \installfont time are concerned, there
>> is no risk that such name changes
>> can ever leak out to a PS interpreter, but name changes followed by a
>> \transformfont can screw up your encoding.
>
>So best advice is obviously: do it to the AFM file! Before anything
>could hit the trousers. (Although I still think of not using
>\transformfont, but only in case someone adopts my solution ...)

Eh? This mostly sounds like you've arrived at the negation of the correct
conclusion. Reread the previous paragraph.

>>>> 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.)
>>>
>>> Yes, I did understand that he is doing the same mistake
>>
>> You mean Han The Thanh (Laurent merely forwarded a mail) is doing a
>> mistake? Ha! Not very likely in this case.
>
>Actually it was Dr. Thanh who wrote he was going to make the same
>mistake as me: taking Unicode indices, I mean numbers. Not names ...

No he didn't. He wrote that ttf2afm offers serveral schemes for assigning
names to glyphs, two of which were (i) to use TTF glyph indices and (ii) to
use Unicode code points, and he also outlined the imperfections of these
methods. You still don't seem to understand the nature of these
imperfections.

Lars Hellström




More information about the fontinst mailing list