B.1. TFM

The TFM format (for "TEX font metrics") was defined in 1980 by Lyle Ramshaw, a student of Knuth, and remains today the only font format recognized by TEX. Only in recent years have extensions of TEX finally used other font formats: TrueType and OpenType.

TFM is a binary format, but there is a human-readable form called PL (for "property list"). In this book, we have adopted the principle of showing only the "humanized" form of a font format whenever it exists, provided that conversion from binary to legible format and vice versa can be done without loss of information.

To convert from TFM to PL, we have a tool: tftopl, written by Leonidas Guibas in 1978. When used in one of the following ways:

   tftopl cmr10 > cmr10.pl
   tftopl cmr10.tfm cmr10.pl

it will convert the font cmr10.tfm, wherever it is found on the disk, to the PL format and store this representation of the font in the file cmr10.pl in the current directory. This manipulation would be useless if the antidote did not exist: the opposite tool pltotf, which restores our font to its binary form. This tool is used as follows:

   pltotf cmr10
   pltotf cmr10.pl othername.tfm

In the first case, a file by the same name as the PL file and with extension .tfm will be created in the current directory, whereas in the second case we explicitly provide the names of these files.

The principle of the PL file syntax is very simple: there are expressions, which have the following form:

   (KEYWORD VALUE)

where KEYWORD is a keyword ...

Get Fonts & Encodings now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.