Computer fonts contain several distinct types of information:
Unfortunately, many different encodings are in use. ISO-8859-1 is an extension of the ASCII encoding. Adobe's PostScript uses a slightly different encoding. TeX uses another. Large character sets often use the multi-byte UTF-8 encoding from Unicode. If the wrong encoding is used, wrong characters will be displayed.
But the post-processors that prepare the formatted page image for display on a terminal or printing on paper must be able to fill in the glyphs. Ultimately, that's done by breaking each glyph into arrays of little dots (like drops of ink from an injet printer): a bitmap.
However, to get the best result, the fonts should not be reduced to bitmaps until the final stages of display. For example, a computer terminal can display shades of gray, and so partly makes up for its poor resolution by shading the pixels that lie on the edge of a glyph — a process called anti-aliasing.
A typical computer screen has about 100 dots per inch (dpi) these days. When text or graphics are displayed on the screen, that's the pixel density that is used to represent the glyphs you see.
On the other hand, printers typically have resolutions from 300 to 1200 dpi (or even more for commercial image-setters). The glyphs that represent the font characters have to be “rasterized” at the resolution of the printer.
This difference in resolution means that the actual representation of a font glyph in terms of dots is different on different output devices. But, to be portable, a formatted document must not depend on the resolution of the final output device; and TeX has no way to know the resolution of the device on which the document will be printed or displayed.
Hence, the output from the TeX compiler is a device-independent (DVI) file. It tells where each glyph goes, but says nothing about the representation of the glyph's shape as a two-dimensional array of dots — i.e., a bitmap.
So the glyphs that compose the text aren't present in the *.dvi file that LaTeX produces. It merely reserves space for them. But they must be present when the file is printed or displayed. The information about glyph shapes comes from font files.
There are two ways to generate a raster image of a font glyph. Either the glyph is stored as a bitmapped image at some particular resolution; or it's described in geometrical terms, and converted to an image at the required resolution when needed. The first method stores bitmapped fonts; the second, outline fonts.
But the DVI file contains only a font name, not a file name (because different computers may actually keep the font files in different places, with different names). So there has to be a lookup table on the computer that maps fontnames to actual files on the hard disk. On Debian, an example would be the file /usr/share/texmf/fontname/texfonts.map, which stores the mapping for some fonts.
Apple and Microsoft tried to circumvent Adobe's proprietary font coding by introducing TrueType fonts (a different outline-font coding scheme). Both systems are widely used.
To make sure you get the scalable (Type 1) versions of fonts in your LaTeX document, put
\usepackage{psfonts}
in the preamble of your *.tex input file. You may also want to add
\usepackage{times}
to use the Adobe Times-Roman font family.
Because of TeX's separation of font metrics from font glyphs, a “font” usually consists of two files; but some font-file formats store everything together in a single file.
Furthermore, the X Window system requires much lower-resolution bitmaps for font glyphs than printers do. And it has its own way of keeping track of font files, which is different from TeX's. Consequently, calling for some particular font (like Times Roman at 10-point size) requires a variety of font files in several different places. The X-Window post-processors (like xdvi) use one set of files; a PostScript printer uses a different set.
TeX's general mechanism for finding font files is described on the formatting page. Clearly, the complexity of font formats poses administrative problems.
Installing and maintaining fonts is a complex system-administration job. In general, the system is well described in Alan Hoenig's book TeX Unbound, and in the Font HOW-TO (at /usr/share/doc/HOWTO/en-txt/Font-HOWTO.gz on Debian systems). An old version is available at Font HOWTO, and the current HTML version is at http://tldp.org/HOWTO/Font-HOWTO/.
Debian also uses the poorly-documented Debian Font Manager, defoma, to assist the system administrator. (See man defoma, man defoma-font, man defoma-app, and man defoma-subst.) For a thorough discussion of defoma, see http://wiki.debian.org/Fonts/Defoma.
Copyright © 2005, 2006, 2010 Andrew T. Young