Virtual fonts

Virtual fonts for TeX were first implemented by David Fuchs in the early days of TeX, but for most people they date from when Knuth redefined the format, and wrote some support software, in 1989 (he published an article in TUGboat at the time, and a plain text copy is available on CTAN).

Virtual fonts provide a way of telling TeX about something more complicated than just a one-to-one character mapping. The entities you define in a virtual font look like characters to TeX (they appear with their sizes in a font metric file), but the DVI processor may expand them to something quite different.

Specifically, TeX itself only looks at a TFM file that contains details of how the virtual font will appear: but of course, TeX only cares about the metrics of a character, so its demands are pretty small. The acro{DVI} processor, however, has to understand the details of what is in the virtual font, so as to know “what to draw, where”. So, for every virtual font read by a DVI driver, there has to be a TFM file to be read by TeX. (PDFTeX, of course, needs both the TFM and the translation of the virtual font, since it does the whole job in the one program.)

You can use a virtual font:

In practice, the most common use of virtual fonts is to remap Adobe Type 1 fonts (see font metrics), though there has also been useful useful work building ‘fake’ maths fonts (by bundling glyphs from several fonts into a single virtual font). Virtual Computer Modern fonts, making a Cork encoded font from Knuth’s originals by using remapping and fragments of DVI for single-glyph ‘accented characters’, were the first “Type 1 format” versions available.

Virtual fonts are normally created in a single ASCII VPL (Virtual Property List) file, which includes both sets of information. The vptovf program is then used to the create the binary TFM and VF files.

A “how-to” document, explaining how to generate a VPL, describes the endless hours of fun that may be had, doing the job by hand. Despite the pleasures to be had of the manual method, the commonest way (nowadays) of generating VPL files is to use the fontinst package, which is described in detail together with the discussion of PostScript font metrics. Qdtexvpl is another utility for creating ad-hoc virtual fonts (it uses TeX to parse a description of the virtual font, and qdtexvpl itself processes the resulting DVI file).

fontinst
fonts/utilities/fontinst (gzipped tar, browse)
Knuth on virtual fonts
info/knuth/virtual-fonts
Virtual fonts “how to”
info/virtualfontshowto/virtualfontshowto.txt
qdtexvpl
fonts/utilities/qdtexvpl (gzipped tar, browse)

This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=virtualfonts