1tfmtodit(1) General Commands Manual tfmtodit(1)
2
3
4
6 tfmtodit - adapt TeX Font Metrics files for use with groff and grodvi
7
9 tfmtodit [-s] [-g gf-file] [-k skew-char] tfm-file map-file font-
10 description
11
12 tfmtodit --help
13
14 tfmtodit -v
15 tfmtodit --version
16
18 tfmtodit creates a font description file for use with groff(1)'s dvi
19 output device. tfm-file is the name of the TeX font metric file for
20 the font. map-file assigns groff ordinary or special character identi‐
21 fiers to glyph indices in the font; it should consist of a sequence of
22 lines of the form
23 i c1 ... cn
24 where i is a position of the glyph in the font in decimal, and c1
25 through cn are glyph identifiers in the form used by groff font de‐
26 scriptions. If a glyph has no groff names but exists in tfm-file, it
27 is put in the groff font description file as an unnamed glyph. Output
28 is written in groff_font(5) format to font-description, a file named
29 for the intended groff font name.
30
31 If the font is “special”, meaning that groff should search it whenever
32 a glyph is not found in the current font, use the -s option and name
33 font-description in the fonts directive in the output device's DESC
34 file.
35
36 To do a good job of math typesetting, groff requires font metric infor‐
37 mation not present in tfm-file. This is because TeX has separate math
38 italic fonts, whereas groff uses normal italic fonts for math. The ad‐
39 ditional information required by groff is given by the two arguments to
40 the math_fit macro in the Metafont programs for the Computer Modern
41 fonts. In a text font (a font for which math_fit is false), Metafont
42 normally ignores these two arguments. Metafont can be made to put this
43 information into the GF (“generic font”) files it produces by loading
44 the following definition after cmbase when creating cm.base.
45 def ignore_math_fit(expr left_adjustment,right_adjustment) =
46 special "adjustment";
47 numspecial left_adjustment*16/designsize;
48 numspecial right_adjustment*16/designsize;
49 enddef;
50 For the EC font family, load the following definition after exbase;
51 consider patching exbase.mf locally.
52 def ignore_math_fit(expr left_adjustment,right_adjustment) =
53 ori_special "adjustment";
54 ori_numspecial left_adjustment*16/designsize;
55 ori_numspecial right_adjustment*16/designsize;
56 enddef;
57 The only difference from the previous example is the “ori_” prefix to
58 “special” and “numspecial”. The GF file created using this modified
59 cm.base or exbase.mf should be specified with the -g option, which
60 should not be given for a font for which math_fit is true.
61
63 --help displays a usage message, while -v and --version show version
64 information; all exit afterward.
65
66 -g gf-file
67 Use the gf-file produced by Metafont containing “special” and
68 “numspecial” commands to obtain additional font metric informa‐
69 tion.
70
71 -k skew-char
72 The skew character of this font is at position skew-char. skew-
73 char should be an integer; it may be given in decimal, with a
74 leading 0 in octal, or with a leading 0x in hexadecimal. Any
75 kerns whose second component is skew-char are ignored.
76
77 -s Add the special directive to the font description file.
78
80 /usr/share/groff/1.23.0/font/devdvi/DESC
81 describes the dvi output device.
82
83 /usr/share/groff/1.23.0/font/devdvi/F
84 describes the font known as F on device dvi.
85
86 /usr/share/groff/1.23.0/font/devdvi/generate/ec.map
87 /usr/share/groff/1.23.0/font/devdvi/generate/msam.map
88 /usr/share/groff/1.23.0/font/devdvi/generate/msbm.map
89 /usr/share/groff/1.23.0/font/devdvi/generate/tc.map
90 /usr/share/groff/1.23.0/font/devdvi/generate/texb.map
91 /usr/share/groff/1.23.0/font/devdvi/generate/texex.map
92 /usr/share/groff/1.23.0/font/devdvi/generate/texi.map
93 /usr/share/groff/1.23.0/font/devdvi/generate/texitt.map
94 /usr/share/groff/1.23.0/font/devdvi/generate/texmi.map
95 /usr/share/groff/1.23.0/font/devdvi/generate/texr.map
96 /usr/share/groff/1.23.0/font/devdvi/generate/texsy.map
97 /usr/share/groff/1.23.0/font/devdvi/generate/textex.map
98 /usr/share/groff/1.23.0/font/devdvi/generate/textt.map
99 map glyph indices in TeX fonts to groff ordinary and special
100 character identifiers. ec.map is used for TREC, TIEC, TBEC,
101 TBIEC, HREC, HIEC, HBEC, HBIEC, CWEC, and CWIEC; msam.map for
102 SA; msbm.map for SB; tc.map for TRTC, TITC, TBTC, TBITC, HRTC,
103 HITC, HBTC, HBITC, CWTC, and CWITC; texb.map for TB, HR, HI, HB,
104 and HBI; texex.map for EX; texi.map for TI and TBI; texitt.map
105 for CWI; texmi.map for MI; texr.map for TR; texsy.map for S;
106 textex.map for SC; and textt.map for CW.
107
109 groff(1), grodvi(1), groff_font(5)
110
111
112
113groff 1.23.0 2 November 2023 tfmtodit(1)