For quite some time now, people are generating TeX font metrics out of TTF files to be able to use TrueType fonts from within (La)TeX. Although the developments of
pdflatexhave brought significant alleviation to this process by making it possible to natively use TTF files, it is still far from straightforward to actually get a font run with ligatures, kerning, and all the fine points those LaTeX fanboys are after.
The tools mostly in use for generating the necessary files include
vptovf, and possibly
afm2tfm. One major reason for using latter is that
ttf2tfmwas not always quite reliable at extracting ligature or kerning information out of the TTF file; instead of
$ ttf2tfm myFont.ttf -q -T myEncoding.enc -v myFont.vpl rmyFont.tfm >> myfont.map
one was often better off going
$ ttf2afm -e myEncoding.enc -o myFont.afm myFont.ttf 2> /dev/null
$ afm2tfm myFont.afm -v myFont.vpl -T myEncoding.enc rmyFont.tfm | sed "s/
and then discarding
Either of the methods had to be followed by a call to
The new kid in TTF townWith this weekend's advent of Eddie Kohler's LCDF typetools 2.79, all of the above can be done reliably in one step only. What you need is a working
otftotfm, for example,
$ otftotfm --version
otftotfm (LCDF typetools) 2.79
Copyright (C) 2002-2009 Eddie Kohler
This is free software; see the source for copying conditions.
There is NO warranty, not even for merchantability or fitness for a
otftotfmworks on, well, OTF font files; this would include TTF files derived from it. You can identify those with the
otfinfotool which also comes with the LCDF typetools. An OTF-derived font file always contains the
GPOStable to host kerning information, e.g.,
$ otfinfo -t Bello-Pro.otf
In an old-style TTF, the kerning information sits in the
kerntable, such as
$ otfinfo --tables times.ttf
otftotfmwas able to extract all info of such a font except kerning, now it does it all. The one call that you need is
$ otftotfm \
This will generate the files
mytexname--bas.tfm, plus the encoding file (mostly
a_012foobar.enc), and generate the correct entry in the map file
Copying those files to the correct location (which
otftotfmcan also do for you, see the manual), and you'll be able to use the font in plain TeX already.
For a more concise tutorial on how to use
otftotfmto include your favourite TrueType into LaTeX, see here.
If you have issues, you might want to look at the TeX font error cheat sheet.