Next: , Up: Long names


3.1 A fontname mapping file

At the moment, most implementations of TeX look up a TFM file (as part of the \font command), by searching for a file with the name given by the user (possibly in any of series of directories). But if we also looked TFM names up in another file (or set of files), which specifies the actual filename, the fontname given in the TeX source file could be almost anything at all, of any length.

In version 5.851d of Web2c, I implemented this mapping file. Each file texfonts.map in a search path is read for abbreviations. The file has a straightforward format: each line specifies the filename and the TeX name for one font, separated by whitespace. Extra information on the line is ignored; then more information could be specified for the benefit of DVI-reading programs in the same file. Comments start with % and continue to the end of the line.

Besides allowing long names, this sort of mapping file has other benefits. TeX source or DVI files can be more easily transported, because the font names in a particular file can be made to work on every system. Also, when combined with a consistent naming scheme, macros could be written to access any of a number of fonts. Right now, each font family has to have specialized macros written to deal with it.

Incidentally, Professor Knuth has approved this as a legitimate “system-dependent” extension; a TeX with such a feature can still be called “TeX”.