[pdftex] is ttf2afm being used at all?

The Thanh Han hanthethanh at myrealbox.com
Fri Jan 28 10:55:22 CET 2005


Hi,

many thanks for your replies to my asking for comments on use of
ttf2afm. Having seen there is no potential problem with backward
compability, I've heavily changed ttf2afm and also TTF support in
pdftex.

Now it is quite easy to use TrueType fonts where you cannot rely on
glyph names (probably because they are missing or wrong for some
glyphs). For example the palatino font(s) by Linotype, coming from
windows2000, don't have glyph names. I tried to use this font with
vietnamese (encoding t5) using the following steps:

1) create the afm with glyph names in 'uniXXXX' form:
ttf2afm -u pala.ttf > pala.afm

2) run fontinst on the following file:

============================================================
\input fontinst.sty
\relax
\installfonts
\transformfont{pala8v}{\reencodefont{t5uni}{\fromafm{pala}}}
\installrawfont{pala8v} {pala8v} {t5uni}{T5}{pala}{m}{n}{}
\endinstallfonts
\bye
============================================================

and then

pltotf pala8v

to get the metric pala8v.tfm. Encoding t5uni.etx is a clone of t5.etx
where all glyph names are replaced by 'uniXXXX'.

Why not use afm2tfm? Because afm2tfm discards all kerning data if a
virtual font is not created. But I don't need virtual font, as the
pala.ttf font contains all glyphs I need. 

3) add a map entry for this font:

pala8v <t5uni.enc <pala.ttf

[similarly t5uni.enc is a clone of t5.enc with glyph names replaced by
'uniXXXX']

and that's it. Now I can typeset vietnamese using this font. Support for
other encoding should be similar.


Thanh



More information about the pdftex mailing list