The process, in outline, is:
I use ttf2afm instead of ttf2pt1 because: 1. ttf2afm comes with teTeX. 2. ttf2pt1 insists on attempting to convert the outlines, which sometimes crashes.3
I use Ghostscript because: 1. The output of ttf2afm omits the encoding. (There's a switch for extracting the encodings separately, but I can't tell which is the default encoding and some TTF encoding-store formats are unknown to it.) 2. I cannot blithely impose an encoding; some TTFs have glyph names that are `strange' (Alchemy has `aries,' `fifty,' 'night,' etc.) or, worse, bogus (BlackChancery and Garton are off by one, with A named `B,' etc.). 3. Ghostscript itself chokes on some TTFs; this is a chance to find out early in the process.
I made a
TCL script
to process a batch of TTFs. One gotcha is
that I also create the Ghostscript mapping with it, so I can't use
findfont to load a font to pull its encoding. I dug up a
nonstandard Ghostscript command .tryloadfont which
gets around the issue.
I think the way to show how to use the script is by example. Its first
argument is a name under which to group the faces, the rest are the names
of TTF files. Suppose the script is named `bundle,' and za.ttf and zb.ttf
are TTFs in the current directory. Issuing
bundle y za.ttf zb.ttf
will produce these files:
extra_modules
of
texmf/dvips/config/updmap.
and the latter run.
Finally the content of y.ps has to be added to Ghostscript's map;
appending it to /usr/pkg/share/ghostscript/6.01vflib/lib/Fontmap.GS
will do (if you installed Ghostscript from the 6.01 NetBSD package;
you should also check that the paths in the map accurately reflect
your system's texmf location).
At this point the new faces should be ready for use, under the names
`za' and `zb.'
As a demo, here's a bit of a title page made with
Intimacy,
Seperates,
and
Nuncio-Normal:
The TeX code was
\centerline{\font\X zintimacy at40pt\X Manchester}
\bigskip
\centerline{\font\X zseperate at40pt\X\char100}
\bigskip
\centerline{\font\X znuncio at30pt\X A Municipal Microcosm}
TTFs tend to come with messy names. I remove underscores, downcase, and start the name with z (as close as I come to conforming to the TeX naming convention) using this csh command:
foreach i (*.[Tt][Tt][Ff])
mv $i `echo z$i | tr A-Z a-z | tr -d _`
end
1. A small correction: it's not strictly necessary that the encoding be embedded in the metric (afm2tfm can accept it from a separate file), but it's convenient. PS: I've discovered that ttf2afm has an option to merge an external encoding. Some day I'll modify the script to exchange the Ghostscript and ttf2afm steps.
2. I've just noticed that kerning info disappears in afm2tfm. Oh sigh.
3. There's a ttf2tfm on my machine; I'm not sure why I decided against it.