1AFMTODIT(1) General Commands Manual AFMTODIT(1)
2
3
4
6 afmtodit - create font files for use with groff -Tps and -Tpdf
7
9 afmtodit [-ckmnsx] [-a n] [-d desc-file] [-e enc-file] [-f internal-
10 name] [-i n] [-o output-file] afm-file map-file font
11
12 afmtodit -v
13
15 afmtodit creates a font file for use with groff, grops, and gropdf.
16 afmtodit is written in Perl; you must have Perl version 5.004 or newer
17 installed in order to run afmtodit.
18
19 afm-file is the AFM (Adobe Font Metric) file for the font.
20
21 map-file is a file that says which groff character names map onto each
22 PostScript character name; this file should contain a sequence of lines
23 of the form
24 ps-char groff-char
25 where ps-char is the PostScript name of the character and groff-char is
26 the groff name of the character (as used in the groff font file). The
27 same ps-char can occur multiple times in the file; each groff-char must
28 occur at most once. Lines starting with ‘#’ and blank lines are
29 ignored. If the file isn't found in the current directory, it is
30 searched for in the devps/generate subdirectory of the default font
31 directory.
32
33 If a PostScript character is not mentioned in map-file, and a generic
34 groff glyph name can't be deduced using the Adobe Glyph List (AGL,
35 built into afmtodit), then afmtodit puts the PostScript character into
36 the groff font file as an unnamed character which can only be accessed
37 by the ‘\N’ escape sequence in a roff document. In particular, this is
38 true for glyph variants named in the form “foo.bar”; all glyph names
39 containing one or more periods are mapped to unnamed entities. If
40 option -e is not specified, the encoding defined in the AFM file (i.e.,
41 entries with non-negative character codes) is used. Refer to section
42 “Using Symbols” in Groff: The GNU Implementation of troff, the groff
43 Texinfo manual, which describes how groff glyph names are constructed.
44
45 Characters not encoded in the AFM file (i.e., entries which have ‘-1’
46 as the character code) are still available in groff; they get glyph
47 index values greater than 255 (or greater than the biggest character
48 code used in the AFM file in the unlikely case that it is greater than
49 255) in the groff font file. Glyph indices of unencoded characters
50 don't have a specific order; it is best to access them with glyph names
51 only.
52
53 The groff font file will be output to a file called font, unless the -o
54 option is used.
55
56 If there is a downloadable font file for the font, it may be listed in
57 the file /usr/share/groff/1.22.4/font/devps/download; see grops(1).
58
59 If the -i option is used, afmtodit will automatically generate an
60 italic correction, a left italic correction and a subscript correction
61 for each character (the significance of these parameters is explained
62 in groff_font(5)); these parameters may be specified for individual
63 characters by adding to the afm-file lines of the form:
64 italicCorrection ps-char n
65 leftItalicCorrection ps-char n
66 subscriptCorrection ps-char n
67 where ps-char is the PostScript name of the character, and n is the
68 desired value of the corresponding parameter in thousandths of an em.
69 These parameters are normally needed only for italic (or oblique)
70 fonts.
71
73 Whitespace is permitted between a command-line option and its argument.
74
75 -an Use n as the slant parameter in the font file; this is used by
76 groff in the positioning of accents. By default afmtodit uses
77 the negative of the ItalicAngle specified in the AFM file; with
78 true italic fonts it is sometimes desirable to use a slant that
79 is less than this. If you find that characters from an italic
80 font have accents placed too far to the right over them, then
81 use the -a option to give the font a smaller slant.
82
83 -c Include comments in the font file in order to identify the Post‐
84 Script font.
85
86 -ddesc-file
87 The device description file is desc-file rather than the default
88 DESC. If not found in the current directory, the devps subdi‐
89 rectory of the default font directory is searched (this is true
90 for both the default device description file and a file given
91 with option -d).
92
93 -eenc-file
94 The PostScript font should be reencoded to use the encoding
95 described in enc-file. The format of enc-file is described in
96 grops(1). If not found in the current directory, the devps sub‐
97 directory of the default font directory is searched.
98
99 -fname The internal name of the groff font is set to name.
100
101 -in Generate an italic correction for each character so that the
102 character's width plus the character's italic correction is
103 equal to n thousandths of an em plus the amount by which the
104 right edge of the character's bounding box is to the right of
105 the character's origin. If this would result in a negative
106 italic correction, use a zero italic correction instead.
107
108 Also generate a subscript correction equal to the product of the
109 tangent of the slant of the font and four fifths of the x-height
110 of the font. If this would result in a subscript correction
111 greater than the italic correction, use a subscript correction
112 equal to the italic correction instead.
113
114 Also generate a left italic correction for each character equal
115 to n thousandths of an em plus the amount by which the left edge
116 of the character's bounding box is to the left of the charac‐
117 ter's origin. The left italic correction may be negative unless
118 option -m is given.
119
120 This option is normally needed only with italic (or oblique)
121 fonts. The font files distributed with groff were created using
122 an option of -i50 for italic fonts.
123
124 -ooutput-file
125 The output file is output-file instead of font.
126
127 -k Omit any kerning data from the groff font; use only for
128 monospaced (constant-width) fonts.
129
130 -m Prevent negative left italic correction values. Roman font
131 files distributed with groff were created with -i0 -m to improve
132 spacing with eqn(1).
133
134 -n Don't output a ligatures command for this font; use with
135 monospaced (constant-width) fonts.
136
137 -s The font is special. The effect of this option is to add the
138 special command to the font file.
139
140 -v Print version and exit.
141
142 -x Don't use the built-in Adobe Glyph List.
143
145 /usr/share/groff/1.22.4/font/devps/DESC
146 Device description file.
147
148 /usr/share/groff/1.22.4/font/devps/F
149 Font description file for font F.
150
151 /usr/share/groff/1.22.4/font/devps/download
152 List of downloadable fonts.
153
154 /usr/share/groff/1.22.4/font/devps/text.enc
155 Encoding used for text fonts.
156
157 /usr/share/groff/1.22.4/font/devps/generate/textmap
158 Standard mapping.
159
161 Groff: The GNU Implementation of troff, by Trent A. Fisher and Werner
162 Lemberg, is the primary groff manual. Section “Using Symbols” may be
163 of particular note. You can browse it interactively with “info
164 '(groff)Using Symbols'”.
165
166 groff(1), gropdf(1), grops(1), groff_font(5), perl(1)
167
168
169
170groff 1.22.4 3 November 2020 AFMTODIT(1)