Web Browser, Text Mode and Command Line

If you click on [W] in the web browser or press [W] in the text mode interface or say gms -w respectively gms /w in the command line, then GMS will write the font map, a list of available fonts which is evaluated by GMS during initialisation of the format file, and later is used again by the TeX engine for typesetting. This font map, however, is only a by-product of a metrics computation process that may last several minutes, depending on computer speed and the number of fonts.


TeX comes from a time before PostScript (PFA/PFB) and TrueType (TTF) fonts were introduced. The TeX approach of typesetting is to place empty boxes accurately on the page, one box for every letter, and to leave it to the screen or printer driver to add the character shape information. So the TeX engine’s device-independent output file (DVI) could only be used on systems that already had installed the same fonts.

The pdfTeX extension written by Hàn Thế Thành enables TeX to embed all glyph data into a portable document, but the old TeX 3x kernel does not want to know what the glyphs look like; it still needs TeX font metric files (TFM) containing data about the letters’ heights, depths, and widths. Moreover, if an encoding (ENC) other than TeX’s proprietary 7-bit code page is used, a virtual font file (VF) must be provided.

The font map keeps together the information about which files are related to any font. A typical entry looks like this: _putr Utopia-Regular " CP1252-Encoding ReEncodeFont " <CP1252.enc <putr.pfb, denoting 1. the base name of the font files (without leading underscore), 2. the PostScript font name mentioned in the font’s AFM file, 3. the PostScript encoding name (quoted), 4. the encoding file, and 5. the glyph file.

While encoding files can be found in [GMS­_ROOT]/da­ta/enc, font files are located in sub-directories of [GMS­_ROOT]/fonts. To minimize search time, AFM files (Adobe or PostScript font metrics), PFA/PFB (PostScript Type 1 glyph files), TFM, TTF, and VF files are kept in separate trees. Within every tree, typesetting systems following the TeX directory specificationTeX directory specification create one level of folders named after the type foundries and a second level named after the font families. There is, however, no technical need for this pedantry.

As reported in fontmap.logfontmap.log, the GMS metric processor creates TFM and VF files from AFM, and AFM from TTF if necessary, running ttf2afm, afm2tfm and vptovf converters. In simple cases, if the GMS main encoding can be used that you have selected and if the PostScript font name must not be corrected, GMS will do this automatically; other­wise you have to modify three configuration files in [GMS­_ROOT]/etc: font.cfg, encoding.cfg and alias.cfg.


Now let us have a closer look on how GMS was given access to certain fonts. Then you will be able to use your favorite fonts with Markup Shredder too:

After re-computing of font metrics and re-writing of the font map, you still have to re-initialize the TeX format file for Markup Shredder.

If a TeX font metric file (TFM) is corrupted, pdfTeX may give you the following error message: ! Font =_GENR at 12pt not loadable: Bad metric (TFM) file ... line 666. I wasn't able to read the size data for this font, so I will ignore the font specification. This error should disappear if font metrics are re-processed; otherwise, you have to remove the corresponding font face from your document and