B.3. VF

The VF format (= "virtual font") was proposed by Knuth in 1990. It was immediately implemented by dvips and many other DVI drivers. We have already explained the advantages and disadvantages of virtual fonts in Sections 9 and 9. Here we shall present their structure.

Let us recall the principle behind virtual fonts: the idea is to replace, within a DVI file, a glyph in a virtual font with more interesting DVI code that for various reasons cannot be produced by TEX. This code can be as short as the simple naming of another glyph or as long as an entire page.

As with TFM files, VF also have a human-readable counterpart, the format VPL (for "virtual properties list"), which is what we shall describe here. The VPL file format is an extension of the PL file format: it contains the same expressions and also a few others that are specific to virtual fonts.

Note that every virtual font must be accompanied by a TFM font with the same metrics, for the very simple reason that TEX can read only TFM files. We can easily obtain the real font associated with a virtual font: all that we have to do is switch to VPL and delete all the expressions specific to the VPL format; we then obtain a PL file that we can then convert to TFM.

The new expressions are of two types: those placed in the preamble, which apply to the entire font, and those found within each glyph, which describe the DVI code that will ultimately replace it. The global expressions are font definitions:

  • (MAPFONT D number

Get Fonts & Encodings now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.