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

Glyph files

Although a metric file (see the previous section) contains information about the spatial and other properties of the character at position 75, say, it contains nothing about what the character at position 75 actually looks like. The glyphs--the actual shapes of the letterforms in a font--are defined by other files, which we call glyph files. TeX itself only reads the TFM file for a font; it does not need to know character shapes.

A glyph file is a file that defines the shapes of the characters in a font. The shapes can be defined either by outlines or by bitmaps.

PostScript fonts are defined as outline fonts: Each character in the font is defined by giving the mathematical curves (lines, arcs, and splines) that define its contours. Different sizes of a character are generated by linearly scaling a single shape. For example, a 10-point `A' is simply half the size of a 20-point `A'. Nowadays, outline fonts usually also contain hints---additional information to improve the appearance of the font at small sizes or low resolutions.

Although various kinds of PostScript outline fonts exist, by far the most common, and the only one we will consider, is called Type 1. The glyph files for Postscript Type 1 fonts typically have names ending in `.pfa' ("printer font ASCII") or `.pfb' ("printer font binary").

In contrast, glyph files for Computer Modern and the other standard TeX fonts are bitmap fonts, generated from Metafont (`.mf') descriptions. The Metafont program distributed with TeX generates bitmaps from these descriptions.

The glyph files for TeX bitmap fonts are usually stored in packed font (PK) files. The names of these files end in `.nnnpk', where nnn is the resolution of the font in dots per inch. For example, `cmr10.600pk' contains the bitmaps for the `cmr10' font at a resolution of 600dpi. (On DOS filesystems, it's more likely `dpi600\cmr10.pk'.)

Metafont actually outputs generic font (GF) files, e.g., `cmr10.600gf', but the GF files are usually converted immediately to PK format (using the gftopk utility that comes with TeX) since PK files are smaller and contain the same information. (The GF format is a historical artifact.)


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