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


TFtoPL: TeX font metric to property list conversion

TFtoPL translates a TeX font metric (TFM, see section `Metric files' in Dvips) file (as output by Metafont, for example) to property list format (a list of parenthesized items describing the font) that humans can edit or read. This program is mostly used by people debugging TeX implementations, writing font utilities, etc. Synopsis:

tftopl [option]... tfmname[.tfm] [plfile[.pl]]

The font tfmname (extended with `.tfm' if necessary) is searched for in the usual places (see section `Supported file formats' in Kpathsea). To see all the relevant paths, set the environment variable KPATHSEA_DEBUG to `-1' before running the program.

If plfile (which is extended with `.pl' if necessary) is not specified, the property list file is written to standard output. The property list file can be converted back to TFM format by the companion program TFtoPL (see the next section).

The program accepts the following option, as well as the standard `-verbose', `-help' and `-version' (see section Common options):

`-charcode-format=type'
Output character codes in the PL file according to type: either `octal' or `ascii'. Default is `ascii' for letters and digits, octal for all other characters. Exception: if the font's coding scheme starts with `TeX math sy' or `TeX math ex', all character codes are output in octal. In `ascii' format, character codes that correspond to graphic characters, except for left and right parentheses, are output as a `C' followed by the single character: `C K', for example. In octal format, character codes are output as the letter `O' followed by octal digits, as in `O 113' for `K'. `octal' format is useful for symbol and other non-alphabetic fonts, where using ASCII characters for the character codes is merely confusing.

As an example of the output, here is the (abridged) property list translation of `cmr10.tfm':

(FAMILY CMR)
(FACE O 352)
(CODINGSCHEME TEX TEXT)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 11374260171)
(FONTDIMEN
   (SLANT R 0.0)
   (SPACE R 0.333334)
   (STRETCH R 0.166667)
   (SHRINK R 0.111112)
   (XHEIGHT R 0.430555)
   (QUAD R 1.000003)
   (EXTRASPACE R 0.111112)
   )
(LIGTABLE
   ...
   (LABEL C f)
   (LIG C i O 14)
   (LIG C f O 13)
   (LIG C l O 15)
   (KRN O 47 R 0.077779)
   (KRN O 77 R 0.077779)
   (KRN O 41 R 0.077779)
   (KRN O 51 R 0.077779)
   (KRN O 135 R 0.077779)
   (STOP)
   ...
   )
...
(CHARACTER C f
   (CHARWD R 0.305557)
   (CHARHT R 0.694445)
   (CHARIC R 0.077779)
   (COMMENT
      (LIG C i O 14)
      (LIG C f O 13)
      (LIG C l O 15)
      (KRN O 47 R 0.077779)
      (KRN O 77 R 0.077779)
      ...
      )
   )
...

As you can see, the general format is a list of parenthesized properties, nested where necessary.


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