3.1 TFM Files

The main entry point to TFM is load-font, the function which allows you to load a tfm file in memory.

Function: load-font FILE

Load FILE into a new font, and return it.

FILE must be a pathname designator. Currently, TFM doesn’t support searching for TFM files in common or standard places (such as TeXLive installations), so you need to know where those files are located, and provide a specific pathname.

Some tfm files actually contain OFM or JFM data rather than just plain TFM. TFM is able to detect those extensions, but doesn’t currently support them. If OFM or JFM contents is detected, load-font signals an extended-tfm warning, and returns nil.

Warning: extended-tfm

Accessors:

  • file: the argument to load-font (a pathname designator).
  • value: currently either "OFM" or "JFM".

Otherwise, if everything goes well (but see Abnormal Situations), the return value is an instance of some font class. In the context of this library, the term “font” denotes such an instance. There are currently three different font classes. The most general and frequent one is simply called font. TeX, however, recognizes two special font categories for which the corresponding classes are math-symbols-font, and math-extension-font. Both of these classes are subclasses of font.