Go to the first, previous, next, last section, table of contents.

Long names

Eight characters is not enough to unambiguously represent all fonts. To do that, we have to allow ourselves arbitrarily long names. Although we certainly cannot use such names for the files themselves, we could still use them in TeX documents given a simple mapping file, as discussed below.

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 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".

A naming scheme for long names

Once we allow ourselves long names, we can construct a naming scheme to handle arbitrary fonts without much difficulty. Here is one proposal, based on the X Window System font naming conventions.

supplier-family-weight-variants-width-encoding--size

supplier is the usual Adobe, Autologic, etc., as well as unknown or bizarre---this last meaning the rest of the name is nonstandard. If the supplier is missing, i.e., the name starts with a -, "public domain" is assumed. For fonts made by individuals, the initials of the designer would probably make a good supplier.

family is ComputerModern or Times or whatever.

Everything else is optional. The -- before the size lets one specify a name with, say, a weight and variants, but then skip the width and encoding, but still be able to give a size.

weight and width are as described earlier.

If there is more than one variant, they are separated with some character other than `-', say `=':

B+H-Lucida-Bold-Sans=Typewriter--10

encoding is what Metafont calls the font_coding_scheme---the layout of the characters in the font. For example, `Cork' or `ISOLatin1' or `AdobeAlternate'.

Names are case-sensitive, for consistency with the rest of TeX and with PostScript, etc. Spaces cannot be used in the name, to make it easier for TeX to parse. Likewise, characters with default category codes other than 11 (letter) or 12 (other) should not be used.

Another possibility is to forget all the above, and simply use the vendor's name (perhaps prefixed by the vendor): `Times-Roman'.


Go to the first, previous, next, last section, table of contents.