[[Move an .OP call in afmtodit.man.]]
[s-roff.git] / src / utils / afmtodit / afmtodit.man
blob04812e6cb35ac6c54a9025ca168a33022b027df7
1 .ig
2 Copyright (C) 1989-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4 Permission is granted to make and distribute verbatim copies of
5 this manual provided the copyright notice and this permission notice
6 are preserved on all copies.
8 Permission is granted to copy and distribute modified versions of this
9 manual under the conditions for verbatim copying, provided that the
10 entire resulting derived work is distributed under the terms of a
11 permission notice identical to this one.
13 Permission is granted to copy and distribute translations of this
14 manual into another language, under the above conditions for modified
15 versions, except that this permission notice may be included in
16 translations approved by the Free Software Foundation instead of in
17 the original English.
21 .\" Like TP, but if specified indent is more than half
22 .\" the current line-length - indent, use the default indent.
23 .de Tp
24 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
25 .el .TP "\\$1"
28 .de OP
29 .ie \\n(.$-1 .RI "[\ \fB\\$1\fP\ " "\\$2" "\ ]"
30 .el .RB "[\ " "\\$1" "\ ]"
34 .TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
37 .SH NAME
38 afmtodit \- create font files for use with groff \-Tps
41 .SH SYNOPSIS
42 .nr a \n(.j
43 .ad l
44 .nr i \n(.i
45 .in +\w'\fBafmtodit 'u
46 .ti \niu
47 .B afmtodit
48 .OP \-mnsv
49 .OP \-a n
50 .OP \-d desc_file
51 .OP \-e enc_file
52 .OP \-i n
53 .I afm_file
54 .I map_file
55 .I font
56 .br
57 .ad \na
59 .LP
60 The whitespace between an command line option and its argument is optional.
62 .SH DESCRIPTION
63 .B afmtodit
64 creates a font file for use with groff and
65 .BR grops .
67 .B afmtodit
68 is written in perl;
69 you must have perl version 3 or newer installed in order to run
70 .BR afmtodit .
72 .LP
73 .I afm_file
74 is the AFM (Adobe Font Metric) file for the font.
76 .LP
77 .I map_file
78 is a file that says which groff character names map onto
79 each PostScript character name;
80 this file should contain a sequence of lines of the form
81 .IP
83 ps_char groff_char
84 .LP
85 where
86 .I ps_char
87 is the PostScript name of the character
88 and
89 .I groff_char
90 is the groff name of the character (as used in the groff font file).
92 The same
93 .I ps_char
94 can occur multiple times in the file;
95 each
96 .I groff_char
97 must occur at most once.
99 Lines starting with
100 .B #
101 and blank lines are ignored.
103 If the file isn't found in the current directory, it is searched in
104 the `devps/generate' subdirectory of the default font directory.
107 If a PostScript character is in the encoding to be used for the font
108 but is not mentioned in
109 .IR map_file ,
110 or if a generic groff glyph name can't be deduced using the Adobe Glyph
111 List (built into
112 .BR afmtodit )
113 then
114 .B afmtodit
115 will put it in the groff font file as an unnamed character,
116 which can be accessed by the
117 .B \eN
118 escape sequence in
119 .BR troff .
121 If option
122 .B \-e
123 is not specified, the encoding defined in the AFM file (i.e., entries with
124 non-negative character codes) is used.
126 Please refer to section `Using Symbols' in the groff info file which
127 describes how groff glyph names are constructed.
130 Characters not encoded in the AFM file (i.e., entries which have \-1 as
131 the character code) are still available in groff; they get glyph index
132 values greater than 255 (or greater than the biggest character code used
133 in the AFM file in the unlikely case that it is greater than 255) in the
134 groff font file.
136 Glyph indices of unencoded characters don't have a specific order; it
137 is best to access them with glyph names only.
140 The groff font file will be output to a file called
141 .IR font .
144 If there is a downloadable font file for the font, it may be listed in
145 the file
146 .BR @FONTDIR@/devps/download ;
148 .BR grops (@MAN1EXT@).
151 If the
152 .B \-i
153 option is used,
154 .B afmtodit
155 will automatically generate an italic correction,
156 a left italic correction and a subscript correction
157 for each character
158 (the significance of these parameters is explained in
159 .BR groff_font (@MAN5EXT@));
160 these parameters may be specified for individual characters by
161 adding to the
162 .I afm_file
163 lines of the form:
165 .BI italicCorrection\  ps_char\ n
167 .BI leftItalicCorrection\  ps_char\ n
169 .BI subscriptCorrection\  ps_char\ n
171 where
172 .I ps_char
173 is the PostScript name of the character,
175 .I n
176 is the desired value of the corresponding parameter in thousandths of an em.
178 These parameters are normally needed only for italic (or oblique) fonts.
181 .SH OPTIONS
183 .BI \-a n
185 .I n
186 as the slant parameter in the font file;
187 this is used by groff in the positioning of accents.
189 By default
190 .B afmtodit
191 uses the negative of the ItalicAngle specified in the afm file;
192 with true italic fonts it is sometimes desirable to use
193 a slant that is less than this.
195 If you find that characters from an italic font have accents
196 placed too far to the right over them,
197 then use the
198 .B \-a
199 option to give the font a smaller slant.
202 .BI \-d desc_file
203 The device description file is
204 .I desc_file
205 rather than the default
206 .BR DESC .
208 If not found in the current directory, the `devps' subdirectory of the
209 default font directory is searched (this is true for both the default
210 device description file and a file given with option
211 .BR \-d ).
214 .BI \-e enc_file
215 The PostScript font should be reencoded to use the encoding described
216 in enc_file.
218 The format of
219 .I enc_file
220 is described in
221 .BR grops (@MAN1EXT@).
223 If not found in the current directory, the `devps' subdirectory of the
224 default font directory is searched.
227 .BI \-i n
228 Generate an italic correction for each character so that 
229 the character's width plus the character's italic correction
230 is equal to
231 .I n
232 thousandths of an em
233 plus the amount by which the right edge of the character's bounding box
234 is to the right of the character's origin.
236 If this would result in a negative italic correction, use a zero
237 italic correction instead.
240 Also generate a subscript correction equal to the 
241 product of the tangent of the slant of the font and
242 four fifths of the x-height of the font.
244 If this would result in a subscript correction greater than the italic
245 correction, use a subscript correction equal to the italic correction
246 instead.
249 Also generate a left italic correction for each character
250 equal to
251 .I n
252 thousandths of an em
253 plus the amount by which the left edge of the character's bounding box
254 is to the left of the character's origin.
256 The left italic correction may be negative unless option
257 .B \-m
258 is given.
261 This option is normally needed only with italic (or oblique) fonts.
263 The font files distributed with groff were created using an option of
264 .B \-i50
265 for italic fonts.
268 .B \-m
269 Prevent negative left italic correction values.
271 Roman font files distributed with groff were created with
272 .B \-i0\ \-m
273 to improve spacing with
274 .BR @g@eqn (@MAN1EXT@).
277 .B \-n
278 Don't output a
279 .B ligatures
280 command for this font.
282 Use this with constant-width fonts.
285 .B \-s
286 The font is special.
288 The effect of this option is to add the
289 .B special
290 command to the font file.
293 .B \-v
294 Print version.
297 .SH FILES
298 .Tp \w'\fB@FONTDIR@/devps/download'u+2n
299 .B @FONTDIR@/devps/DESC
300 Device description file.
303 .BI @FONTDIR@/devps/ F
304 Font description file for font
305 .IR F .
308 .B @FONTDIR@/devps/download
309 List of downloadable fonts.
312 .B @FONTDIR@/devps/text.enc
313 Encoding used for text fonts.
316 .B @FONTDIR@/devps/generate/textmap
317 Standard mapping.
320 .SH "SEE ALSO"
321 .BR groff (@MAN1EXT@),
322 .BR grops (@MAN1EXT@),
323 .BR groff_font (@MAN5EXT@),
324 .BR perl (1)
327 The groff info file, section `Using Symbols'.
329 .\" Local Variables:
330 .\" mode: nroff
331 .\" End: