1AFMTODIT(1) General Commands Manual AFMTODIT(1)
2
3
4
6 afmtodit - create font files for use with groff -Tps
7
9 afmtodit [-ckmnsvx] [-a n] [-d desc_file] [-e enc_file] [-f inter‐
10 nal_name] [-i n] afm_file map_file font
11
12 The whitespace between a command line option and its argument is
13 optional.
14
16 afmtodit creates a font file for use with groff and grops. afmtodit is
17 written in perl; you must have perl version 5.004 or newer installed in
18 order to run afmtodit.
19
20 afm_file is the AFM (Adobe Font Metric) file for the font.
21
22 map_file is a file that says which groff character names map onto each
23 PostScript character name; this file should contain a sequence of lines
24 of the form
25
26 ps_char groff_char
27
28 where ps_char is the PostScript name of the character and groff_char is
29 the groff name of the character (as used in the groff font file). The
30 same ps_char can occur multiple times in the file; each groff_char must
31 occur at most once. Lines starting with # and blank lines are ignored.
32 If the file isn't found in the current directory, it is searched in the
33 `devps/generate' subdirectory of the default font directory.
34
35 If a PostScript character is not mentioned in map_file, and a generic
36 groff glyph name can't be deduced using the Adobe Glyph List (AGL,
37 built into afmtodit), then afmtodit puts the PostScript character into
38 the groff font file as an unnamed character which can only be accessed
39 by the \N escape sequence in troff. In particular, this is true for
40 glyph variants like `foo.bar'; all glyph names containing one or more
41 periods are mapped to unnamed entities. If option -e is not specified,
42 the encoding defined in the AFM file (i.e., entries with non-negative
43 character codes) is used. Please refer to section `Using Symbols' in
44 the groff info file which describes how groff glyph names are con‐
45 structed.
46
47 Characters not encoded in the AFM file (i.e., entries which have -1 as
48 the character code) are still available in groff; they get glyph index
49 values greater than 255 (or greater than the biggest character code
50 used in the AFM file in the unlikely case that it is greater than 255)
51 in the groff font file. Glyph indices of unencoded characters don't
52 have a specific order; it is best to access them with glyph names only.
53
54 The groff font file will be output to a file called font.
55
56 If there is a downloadable font file for the font, it may be listed in
57 the file /usr/share/groff/1.20.1/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
65 italicCorrection ps_char n
66 leftItalicCorrection ps_char n
67 subscriptCorrection ps_char n
68
69 where ps_char is the PostScript name of the character, and n is the
70 desired value of the corresponding parameter in thousandths of an em.
71 These parameters are normally needed only for italic (or oblique)
72 fonts.
73
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 PS
84 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'
97 subdirectory 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 -k Omit any kerning data from the groff font. This should be used
125 only for mono-spaced fonts.
126
127 -m Prevent negative left italic correction values. Roman font
128 files distributed with groff were created with -i0 -m to improve
129 spacing with eqn(1).
130
131 -n Don't output a ligatures command for this font. Use this with
132 constant-width fonts.
133
134 -s The font is special. The effect of this option is to add the
135 special command to the font file.
136
137 -v Print version.
138
139 -x Don't use the built-in Adobe Glyph List.
140
142 /usr/share/groff/1.20.1/font/devps/DESC
143 Device description file.
144
145 /usr/share/groff/1.20.1/font/devps/F
146 Font description file for font F.
147
148 /usr/share/groff/1.20.1/font/devps/download
149 List of downloadable fonts.
150
151 /usr/share/groff/1.20.1/font/devps/text.enc
152 Encoding used for text fonts.
153
154 /usr/share/groff/1.20.1/font/devps/generate/textmap
155 Standard mapping.
156
158 groff(1), grops(1), groff_font(5), perl(1)
159
160 The groff info file, section `Using Symbols'.
161
162
163
164Groff Version 1.20.1 9 January 2009 AFMTODIT(1)