1afmtodit(1) General Commands Manual afmtodit(1)
2
3
4
6 afmtodit - adapt Adobe Font Metrics files for groff PostScript and PDF
7 output
8
10 afmtodit [-ckmnsx] [-a slant] [-d device-description-file]
11 [-e encoding-file] [-f internal-name] [-i italic-correction-
12 factor] [-o output-file] [-w space-width] afm-file map-file
13 font-description-file
14
15 afmtodit --help
16
17 afmtodit -v
18 afmtodit --version
19
21 afmtodit adapts an Adobe Font Metric file, afm-file, for use with the
22 ps and pdf output devices of troff(1). map-file associates a groff or‐
23 dinary or special character name with a PostScript glyph name. Output
24 is written in groff_font(5) format to font-description-file, a file
25 named for the intended groff font name (but see the -o option).
26
27 map-file should contain a sequence of lines of the form
28 ps-glyph groff-char
29 where ps-glyph is the PostScript glyph name and groff-char is a groff
30 ordinary (if of unit length) or special (if longer) character identi‐
31 fier. The same ps-glyph can occur multiple times in the file; each
32 groff-char must occur at most once. Lines starting with “#” and blank
33 lines are ignored. If the file isn't found in the current directory,
34 it is sought in the devps/generate subdirectory of the default font di‐
35 rectory.
36
37 If a PostScript glyph is not mentioned in map-file, and a groff charac‐
38 ter name can't be deduced using the Adobe Glyph List (AGL, built into
39 afmtodit), then afmtodit puts the PostScript glyph into the groff font
40 description file as an unnamed glyph which can only be accessed by the
41 “\N” escape sequence in a roff document. In particular, this is true
42 for glyph variants named in the form “foo.bar”; all glyph names con‐
43 taining one or more periods are mapped to unnamed entities. Unless -e
44 is specified, the encoding defined in the AFM file (i.e., entries with
45 non-negative codes) is used. Refer to section “Using Symbols” in
46 Groff: The GNU Implementation of troff, the groff Texinfo manual, or
47 groff_char(7), which describe how groff character identifiers are con‐
48 structed.
49
50 Glyphs not encoded in the AFM file (i.e., entries indexed as “-1”) are
51 still available in groff; they get glyph index values greater than 255
52 (or greater than the biggest code used in the AFM file in the unlikely
53 case that it is greater than 255) in the groff font description file.
54 Unencoded glyph indices don't have a specific order; it is best to ac‐
55 cess them only via special character identifiers.
56
57 If the font file proper (not just its metrics) is available, listing it
58 in the files /usr/share/groff/1.23.0/font/devps/download and /usr/
59 share/groff/1.23.0/font/devpdf/download enables it to be embedded in
60 the output produced by grops(1) and gropdf(1), respectively.
61
62 If the -i option is used, afmtodit automatically generates an italic
63 correction, a left italic correction, and a subscript correction for
64 each glyph (the significance of these is explained in groff_font(5));
65 they can be specified for individual glyphs by adding to the afm-file
66 lines of the form:
67 italicCorrection ps-glyph n
68 leftItalicCorrection ps-glyph n
69 subscriptCorrection ps-glyph n
70 where ps-glyph is the PostScript glyph name, and n is the desired value
71 of the corresponding parameter in thousandths of an em. Such parame‐
72 ters are normally needed only for italic (or oblique) fonts.
73
74 The -s option should be given if the font is “special”, meaning that
75 groff should search it whenever a glyph is not found in the current
76 font. In that case, font-description-file should be listed as an argu‐
77 ment to the fonts directive in the output device's DESC file; if it is
78 not special, there is no need to do so, since troff(1) will automati‐
79 cally mount it when it is first used.
80
82 --help displays a usage message, while -v and --version show version
83 information; all exit afterward.
84
85 -a slant
86 Use slant as the slant (“angle”) parameter in the font descrip‐
87 tion file; this is used by groff in the positioning of accents.
88 By default afmtodit uses the negative of the ItalicAngle speci‐
89 fied in the AFM file; with true italic fonts it is sometimes de‐
90 sirable to use a slant that is less than this. If you find that
91 an italic font places accents over base glyphs too far to the
92 right, use -a to give it a smaller slant.
93
94 -c Include comments in the font description file identifying the
95 PostScript font.
96
97 -d device-description-file
98 The device description file is desc-file rather than the default
99 DESC. If not found in the current directory, the devps subdi‐
100 rectory of the default font directory is searched (this is true
101 for both the default device description file and a file given
102 with option -d).
103
104 -e encoding-file
105 The PostScript font should be reencoded to use the encoding de‐
106 scribed in enc-file. The format of enc-file is described in
107 grops(1). If not found in the current directory, the devps sub‐
108 directory of the default font directory is searched.
109
110 -f internal-name
111 The internal name of the groff font is set to name.
112
113 -i italic-correction-factor
114 Generate an italic correction for each glyph so that its width
115 plus its italic correction is equal to italic-correction-factor
116 thousandths of an em plus the amount by which the right edge of
117 the glyph's bounding box is to the right of its origin. If this
118 would result in a negative italic correction, use a zero italic
119 correction instead.
120
121 Also generate a subscript correction equal to the product of the
122 tangent of the slant of the font and four fifths of the x-height
123 of the font. If this would result in a subscript correction
124 greater than the italic correction, use a subscript correction
125 equal to the italic correction instead.
126
127 Also generate a left italic correction for each glyph equal to
128 italic-correction-factor thousandths of an em plus the amount by
129 which the left edge of the glyph's bounding box is to the left
130 of its origin. The left italic correction may be negative un‐
131 less option -m is given.
132
133 This option is normally needed only with italic (or oblique)
134 fonts. The font description files distributed with groff were
135 created using an option of -i50 for italic fonts.
136
137 -o output-file
138 Write to output-file instead of font-description-file.
139
140 -k Omit any kerning data from the groff font; use only for mono‐
141 spaced (constant-width) fonts.
142
143 -m Prevent negative left italic correction values. Font descrip‐
144 tion files for roman styles distributed with groff were created
145 with “-i0 -m” to improve spacing with eqn(1).
146
147 -n Don't output a ligatures command for this font; use with mono‐
148 spaced (constant-width) fonts.
149
150 -s Add the special directive to the font description file.
151
152 -w space-width
153 Use space-width as the with of inter-word spaces.
154
155 -x Don't use the built-in Adobe Glyph List.
156
158 /usr/share/groff/1.23.0/font/devps/DESC
159 describes the ps output device.
160
161 /usr/share/groff/1.23.0/font/devps/F
162 describes the font known as F on device ps.
163
164 /usr/share/groff/1.23.0/font/devps/download
165 lists fonts available for embedding within the PostScript docu‐
166 ment (or download to the device).
167
168 /usr/share/groff/1.23.0/font/devps/generate/dingbats.map
169 /usr/share/groff/1.23.0/font/devps/generate/dingbats-reversed.map
170 /usr/share/groff/1.23.0/font/devps/generate/slanted-symbol.map
171 /usr/share/groff/1.23.0/font/devps/generate/symbol.map
172 /usr/share/groff/1.23.0/font/devps/generate/text.map
173 map names in the Adobe Glyph List to groff special character
174 identifiers for Zapf Dingbats (ZD), reversed Zapf Dingbats
175 (ZDR), slanted symbol (SS), symbol (S), and text fonts, respec‐
176 tively. These map-files are used to produce the font descrip‐
177 tion files provided with groff for the grops output driver.
178
180 AGL name 'x' already mapped to groff name 'y'; ignoring AGL name
181 'uniXXXX'
182 You can disregard these if they're in the form shown, where the
183 ignored AGL name contains four hexadecimal digits XXXX. The
184 Adobe Glyph List (AGL) has its own names for glyphs; they are
185 often different from groff's special character names. afmtodit
186 is constructing a mapping from groff special character names to
187 AGL names; this can be a one-to-one or many-to-one mapping, but
188 one-to-many will not work, so afmtodit discards the excess map‐
189 pings. For example, if x is *D, y is Delta, and z is uni0394,
190 afmtodit is telling you that the groff font description that it
191 is writing cannot map the groff special character \[*D] to AGL
192 glyphs Delta and uni0394 at the same time.
193
194 If you get a message like this but are unhappy with which map‐
195 ping is ignored, a remedy is to craft an alternative map-file
196 and re-run afmtodit using it.
197
199 Groff: The GNU Implementation of troff, by Trent A. Fisher and Werner
200 Lemberg, is the primary groff manual. Section “Using Symbols” may be
201 of particular note. You can browse it interactively with “info
202 '(groff)Using Symbols'”.
203
204 groff(1), gropdf(1), grops(1), groff_font(5)
205
206
207
208groff 1.23.0 2 November 2023 afmtodit(1)