[pdftex] ttf2afm bug
The Thanh Han
hanthethanh at gmail.com
Tue Jun 17 09:30:05 CEST 2008
On Mon, Jun 16, 2008 at 09:01:01AM +0400, Лидовский Владимир wrote:
> Hello
>
> I've performed some experiments with free True Type Unicode Cyberbas font from
>
> http://www.wazu.jp/gallery/Fonts_CyrS.html
>
> I've found that ttf2afm can find glyph names missed in the font and can omit glyph names presented in the font. For example,
>
> ttf2afm Cyberbas.ttf
>
> produces 1249 glyph names in the afm-file. The next sh/ps script also produces 1249 glyph names. However the sets of glyph names are not identical.
>
> echo Cyberbas \(Cyberbas.ttf\)\; >Fontmap #if this font doesn't registered for gs
> echo 'Cyberbas findfont /str 70 string def /CharStrings get
> {pop str cvs print (\n) print} forall quit' >showglyphnames.ps
> gs -q showglyphnames.ps
>
> Further tests show that the set produced by gs is correct one. For example, ttf2afm shows glyph names `cdot', `Cdot', `macron', 'mu', ... (total 15 names) which are missed in the font and omits glyph names `cdotaccent', `Cdotaccent', `increment', `mu1' (total 15) which are presented. It is impossible to see missed glyphs by command
>
> /Cyberbas findfont 40 scalefont setfont 70 70 moveto GLYPHNAME glyphshow
>
> for gs. The similar differencies were gotten for all other tested TT-fonts (Lucida, CharisSIL, ...).
any argument to support that gs is correct here please? eg
why "cdot" is wrong and "cdotaccent" is right, and not vice
versa?
> BTW Why doesn't ttf2afm use call for gs?
because when ttf2afm was written, gs support for ttf was
very poor. In fact I reported a few bugs related to ttf
processing to Peter Deutsch when I added ttf support to
pdftex.
> There is also a suggestion about a feature. IMHO the program `ttf2enc' (or even `font2enc') will be useful for the TeX-world, e.g.,
>
> ttf2enc t2a Cyberbas.ttf
>
> should produce Cyberbas.enc to use in the map-file with `Cyberbas.ttf' for pdftex... I've written
> `afmtoenc' utility for the mentioned purpose -- its raw variant is at
>
> http://litwr.boom.ru/tex.html
>
> It is a bit odd that such kind of a program didn't appear 10-15 years ago.
ttf2afm can output enc files, and it already exists for more
than 10 years.
Regards,
Thanh
More information about the pdftex
mailing list