% language=us runpath=texruns:manuals/fonts \startcomponent fonts-appendix \environment fonts-environment \startchapter[title=Appendix][color=darkgray] \startsection[title=The \type {tfm} file,reference=fontdata:tfm] The (binary) \type {tfm} file is not human readable but can be turned into a verbose property list which is not that hard to understand. \starttyping tftopl texnansi-lmr10.tfm \stoptyping Here is an excerpt from the data file. It starts with some general properties of the font. The \type {O} means that the value is in octal while the \type {R} is a real. Keep in mind that \TEX\ has no datatype \quote {real} so internally it is just integers representing scaled points. \startnarrowtyping (FAMILY LMROMAN10) (FACE O 352) (CODINGSCHEME LY1 ENCODING /TEX'N'ANSI, Y&Y/) (DESIGNSIZE R 10.0) (COMMENT DESIGNSIZE IS IN POINTS) (COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE) (CHECKSUM O 4720464277) \stopnarrowtyping A text font has the following font dimensions: \startnarrowtyping (FONTDIMEN (SLANT R 0.0) (SPACE R 0.333333) (STRETCH R 0.166667) (SHRINK R 0.111112) (XHEIGHT R 0.43055) (QUAD R 1.0) (EXTRASPACE R 0.111112) ... ) \stopnarrowtyping Kerns and ligatures are packed into a table that is basically a sequence of labelled entries. Here we see the entry for the character \type {f} which has three ligatures: \type {ff}, \type {fi} and \type {fl}. Because ligatures can be chained, octal slot 13 will have ligature entries for \type {ffl} and \type {ffi}. \startnarrowtyping (LIGTABLE ... (LABEL C f) (LIG C f O 13) (LIG C i O 14) (LIG C l O 10) (KRN O 135 R 0.027779) (KRN O 41 R 0.027779) (KRN O 51 R 0.027779) (KRN O 77 R 0.027779) (KRN O 223 R 0.027779) (KRN O 224 R 0.027779) (KRN O 140 R 0.027779) (KRN O 47 R 0.027779) (STOP) ... ) \stopnarrowtyping Each character gets its own entry. In this case there is no depth involved so it is not shown. The comment is just a repetition of the entry in the ligtable. \startnarrowtyping (CHARACTER C f (CHARWD R 0.30555) (CHARHT R 0.688875) (CHARIC R 0.079222) (COMMENT (LIG C f O 13) (LIG C i O 14) (LIG C l O 10) (KRN O 135 R 0.027779) (KRN O 41 R 0.027779) (KRN O 51 R 0.027779) (KRN O 77 R 0.027779) (KRN O 223 R 0.027779) (KRN O 224 R 0.027779) (KRN O 140 R 0.027779) (KRN O 47 R 0.027779) ) ) \stopnarrowtyping \stopsection \startsection[title=The \type {vf} file,reference=fontdata:vf] A virtual font specification file can be converted to a more readable format with \type {vftovp}, for instance: \starttyping vftovp eurm10.vf \stoptyping The information in a \type {vf} file will be combined with the data in the accompanying \type {tfm} file so the output looks similar: \startnarrowtyping (VTITLE ) (FAMILY UNSPECIFIED) (FACE F MRR) (CODINGSCHEME TEX MATH ITALIC) (DESIGNSIZE R 10.0) (COMMENT DESIGNSIZE IS IN POINTS) (COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE) (CHECKSUM O 24401046203) (SEVENBITSAFEFLAG TRUE) \stopnarrowtyping Because this font is a math font there is no space defined. \startnarrowtyping (FONTDIMEN (SLANT R 0.0) (SPACE R 0.0) (STRETCH R 0.0) (SHRINK R 0.0) (XHEIGHT R 0.459) (QUAD R 1.0) (EXTRASPACE R 0.0) ) \stopnarrowtyping A virtual font will take glyphs from another font and therefore there are entries that refer to these fonts. In the following definition index \type {0} is created (the \type {D} specifies a decimal entry). \startnarrowtyping (MAPFONT D 0 (FONTNAME eurm10) (FONTCHECKSUM O 4276740471) (FONTAT R 1.0) (FONTDSIZE R 10.0) ) (MAPFONT D 1 (FONTNAME cmmi10) (FONTCHECKSUM O 1350061076) (FONTAT R 1.0) (FONTDSIZE R 10.0) ) \stopnarrowtyping The zero indexed font is the default, so in the following entry this font is taken: \startnarrowtyping (CHARACTER C W (CHARWD R 0.986) (CHARHT R 0.691) (CHARIC R 0.056) (COMMENT (KRN O 177 R 0.056) (KRN O 75 R -0.056) (KRN O 73 R -0.083) (KRN O 72 R -0.083) ) (MAP (SETCHAR C W) ) ) \stopnarrowtyping The next specification is a combination of two other glyphs becoming a new glyph. We see here that the \type {MAP} table is actually a sort of program: \startnarrowtyping (CHARACTER O 200 (CHARWD R 0.622) (CHARHT R 0.691) (MAP (PUSH) (MOVEDOWN R -0.18) (MOVERIGHT R 0.015) (SELECTFONT D 2) (SETCHAR O 40) (POP) (SELECTFONT D 0) (SETCHAR C h) ) ) \stopnarrowtyping The character information is also in the \type {tfm} companion and that is what \TEX\ uses. The virtual information kicks in when the backend is creating the page stream and embedding the fonts. \stopsection \startsection[title=The \type {map} file,reference=fontdata:map] In a map file each line maps a font name onto a file that contains the font shapes in bitmap or outline format. For instance in the file \type {lm-texnansi.map} we find the line: \startnarrowtyping texnansi-lmr10 LMRoman10-Regular "enclmtexnansi ReEncodeFont"