Font vendors such as Adobe supply metric files for each font, in AFM
(Adobe Font Metric) form; these can be converted to TFM
(TeX Font Metric) form. The CTAN archives have prebuilt metrics
which will be more than enough for many people (fonts/psfonts;
beware - this directory is at the root of a huge tree), but you may
need to do the conversion yourself if you have special needs or
acquire a new font. One important question is the encoding of
(Latin character) fonts; while we all more or less agree about the
position of about 96 characters in fonts (the basic ASCII set), the
rest of the (typically) 256 vary. The most obvious problems are with
floating accents and special characters such as the `pounds sterling'
sign. There are three ways of dealing with this: either you change the
TeX macros which reference the characters (not much fun, and
error-prone); or you change the encoding of the font (easier than you
might think); or you use
virtual fonts
to pretend to
TeX that the encoding is the same as it is used to. If you use
LaTeX2e, it allows for changing the encoding in TeX; read the
LaTeX Companion
(see TeX-related books) for more details.
In practice, if you do much non-English (but Latin script)
typesetting, you are strongly recommended to use the fontenc
package with option `T1
' to select T1
(`Cork')
encoding.
Alan Jeffrey's fontinst package (fonts/utilities/fontinst) is an AFM to TFM converter written in TeX; it is used to generate the files used by LaTeX2e's PSNFSS package to support use of PostScript fonts. It is a sophisticated package, not for the faint-hearted, but is powerful enough to cope with most needs. Much of its power relies on the use of virtual fonts.
For slightly simpler problems, Rokicki's afm2tfm, distributed with dvips (dviware/dvips), is fast and efficient; note that the metrics and styles that come with dvips are not currently LaTeX2e compatible, but Karl Berry plans to distribute metrics directly compatible with PSNFSS in his dvipsk package.
For the Macintosh, there is a program called EdMetrics which does the job (and more). It comes with the Textures distribution, but is in fact free software, available as systems/mac/textures/utilities/EdMetrics.sea.hqx
MS-DOS users can buy (see commercial implementations) Y&Y's Font Manipulation Tools package which includes a powerful afmtotfm program among many other goodies.