Copyright (C) 2000-2012 |
GNU Info (dvips.info)Metric filesMetric files ------------ A "metric file" describes properties of the font that are independent of what the characters actually look like. Aside from general information about the font itself, a metric file has two kinds of information: information about individual characters, organized by character code, and information about sequences of characters. The per-character information specifies the width, height, depth, and italic correction of each character in the font. Any might be zero. In addition to information on individual characters, the metric file specifies "kerning", i.e., adding or removing space between particular character pairs. It further specifies "ligature" information: when a sequence of input characters should be typeset as a single (presumably different) "ligature" character. For example, it's traditional for the input `fi' to be typeset as `fi', not as `fi' (with the dot of the `i' colliding with `f'). (In English, the only common ligatures are fi, fl, ff, ffi, and ffl.) Different typesetting systems use different metric file formats: * Each Postscript font has an "Adobe font metrics" (`.afm') file. These files are plain text, so you can inspect them easily. You can get AFM files for Adobe's fonts from `ftp://ftp.adobe.com/pub/adobe/Fonts/AFMs'. * TeX uses "TeX font metrics" (`.tfm') files. When you say `\font = FONT' in your TeX document, TeX reads a file named `FONT.tfm'. (Well, except for the `texfonts.map' feature; *note Fontmap: (kpathsea)Fontmap.). TeX can then calculate the space occupied by characters from the font when typesetting. In addition, the DVI drivers you use to print or view the DVI file produced by TeX may need to look at the TFM file. TFM files are binary (and hence are typically much smaller than AFM files). You can use the `tftopl' program (*note tftopl invocation: (web2c)tftopl invocation.) that comes with TeX to transform a TFM file into a human-readable "property list" (`.pl') file. You can also edit a PL file and transform it back to a TeX-readable TFM with the companion program `pltotf' (*note pltotf invocation: (web2c)pltotf invocation.). Editing metrics by hand is not something you're likely to want to do often, but the capability is there. * ATM and other typesetting systems use "printer font metric" (`.pfm') files. These are binary files. They are irrelevant in the TeX world, and not freely available, so we will not discuss them further. The Afm2tfm program distributed with Dvips converts an AFM file to a TFM file and performs other useful transformations as well. Note: Invoking afm2tfm. automatically generated by info2www version 1.2.2.9 |