F.3. MetaFog

Over the past 20 years, there have been several attempts to produce PostScript or TrueType fonts from METAFONT code, the first of them doubtless being that of Shimon Yanai and Daniel Berry [355], who developed a program called mf2ps that converted METAFONT surfaces into PostScript Type 1 contours. The code for this software (which is in fact a change-file for METAFONT—i.e., a file for adding Pascal code to METAFONT and modifying that code) can be found on the CTAN servers (http://www.ctan.org), but it is difficult to compile today, as it depends on a library of subroutines peculiar to Sun that dates from the years 1990 to 1991.

Richard Kinch, in his TrueTEX system [210], offered a program (for Windows only) called MetaFog [209] that converts METAFONT code into TrueType contours.

The process is quite complex:

  1. We begin by compiling the METAFONT sources with METAPOST(!). The latter produces a file for each glyph in the font. We assemble the glyphs into a ZIP archive.

  2. We launch MetaFog on those glyphs through the use of an AWK script. MetaFog produces two types of glyph-description files: reduced ones (those that have valid contours) and nonreduced ones (in which the contours of the different METAFONT pen strokes have not been merged). It is the filename that differs: for example, _065.eps is a reduced file, and _065u.eps is a nonreduced file.

  3. We open the nonreduced files in the program weed (Figure F-4). This program is a type of glyph editor in which we can do only one ...

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.