GNU Info

Info Node: (web2c.info)Font file formats

(web2c.info)Font file formats


Next: gftopk invocation Up: Font utilities
Enter node , (file) or (file)node

Font file formats
=================

  (For another perspective on this, Note: Font concepts.
).

  Font files come in several varieties, with suffixes like:
     .tfm  .*pk  .*gf  .*pxl (obsolete)  .pl  .mf  .vf  .vpl

Each represents a file format.

  A TFM (TeX font metric) file is a compact binary file that contains
information about each character in a font, about combinations of
characters within that font, and about the font as a whole.  The font
metric information contained in TFM files is device-independent units is
used by TeX to do typesetting.  Unlike the bitmap (raster) fonts
described below, TFM font files contain no information about the shapes
of characters.  They describe rectangular areas and combinations
thereof, but not what will eventually be printed in those areas.

  Since TeX does scaling calculations, one TFM file serves for all
magnifications of a given typeface.  On the other hand, the best printed
results are obtained when magnified (or reduced fonts) are not produced
geometrically (as done by PostScript, for example) but rather optically,
with each size a separate design (as done with Computer Modern and the
EC fonts, for example); then a separate TFM file is needed for each
size.

  At any rate, TeX produces a DVI (DeVice Independent) file from your
source document.  In order to print DVI files on real devices, you need
font files defining digitized character shapes and other data.  Then
previewers and printer-driver programs can translate your DVI files into
something usable by your monitor or printer.  Bitmap fonts come with
suffixes such as `.600pk' or `.600gf' or `.3000pxl', where the `600' is
the horizontal dots-per-inch resolution at which the font was produced,
and the `pk' or `gf' or `pxl' indicates the font format.  Outline fonts
in PostScript Type 1 format have suffixes such as `.pfa' or `.pfb'.

  Fonts in pk (packed) format are in the tightly packed raster format
that is pretty much the standard today.  They take up less space than
fonts in the gf (generic font) format that Metafont generates, and far
less space than fonts in pxl format.  Fonts in pxl format take up gross
amounts of disk space and permit only 128 characters.  They are
obsolete.

  Font files with the `.pl' (property list) suffix are the plain text
(human-readable) analog of the binary `.tfm' files.  The TFtoPL and
PLtoTF programs convert between the two formats (Note: tftopl
invocation and Note: pltotf invocation).

  Font files with the `.mf' suffix are in Metafont source format.
These are the files used by Metafont to generate rastered fonts for
specific typefaces at specific magnifications for the specific
resolution and type of mapping used by your device.

  The suffix `.vf' identifies "virtual font" files, for which `.vpl' is
the human-readable analog.  See Note: vftovp invocation, and Note:
vptovf invocation.  For further discussion of virtual fonts, see
`CTAN:/doc/virtual-fonts.knuth', `CTAN:/help/virtualfonts.txt', and
Note: Virtual fonts.

  (This section is based on documentation in the original Unix TeX
distribution by Pierre MacKay and Elizabeth Tachikawa.)


automatically generated by info2www version 1.2.2.9