Update to groff 1.19.2.
[dragonfly.git] / contrib / groff-1.19 / src / utils / afmtodit / afmtodit.man
1 .ig
2 Copyright (C) 1989-2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
3
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.
7
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.
12
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.
18 ..
19 .
20 .
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"
26 ..
27 .
28 .de OP
29 .  ie \\n(.$-1 .RI "[\ \fB\\$1\fP\ " "\\$2" "\ ]"
30 .  el .RB "[\ " "\\$1" "\ ]"
31 ..
32 .
33 .
34 .TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
35 .
36 .
37 .SH NAME
38 afmtodit \- create font files for use with groff \-Tps
39 .
40 .
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 \-mnsvx
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
58 .
59 .LP
60 The whitespace between an command line option and its argument is optional.
61 .
62 .SH DESCRIPTION
63 .B afmtodit
64 creates a font file for use with groff and
65 .BR grops .
66 .
67 .B afmtodit
68 is written in perl;
69 you must have perl version 5.004 or newer installed in order to run
70 .BR afmtodit .
71 .
72 .LP
73 .I afm_file
74 is the AFM (Adobe Font Metric) file for the font.
75 .
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
82 .I
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).
91 .
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.
98 .
99 Lines starting with
100 .B #
101 and blank lines are ignored.
102 .
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.
105 .
106 .LP
107 If a PostScript character is not named as
108 .BI uni XXXX
109 .RI ( XXXX
110 are four uppercase hexadecimal digits), and is not mentioned in
111 .IR map_file ,
112 and a generic groff glyph name can't be deduced using the
113 Adobe Glyph List (AGL, built into
114 .BR  afmtodit ),
115 then
116 .B afmtodit
117 puts the PostScript character into the groff font file as an unnamed
118 character which can only be accessed by the
119 .B \eN
120 escape sequence in
121 .BR troff .
122 .
123 If option
124 .B \-e
125 is not specified, the encoding defined in the AFM file (i.e., entries
126 with non-negative character codes) is used.
127 .
128 Please refer to section `Using Symbols' in the groff info file which
129 describes how groff glyph names are constructed.
130 .
131 .LP
132 Characters not encoded in the AFM file (i.e., entries which have \-1 as
133 the character code) are still available in groff; they get glyph index
134 values greater than 255 (or greater than the biggest character code used
135 in the AFM file in the unlikely case that it is greater than 255) in the
136 groff font file.
137 .
138 Glyph indices of unencoded characters don't have a specific order; it
139 is best to access them with glyph names only.
140 .
141 .LP
142 The groff font file will be output to a file called
143 .IR font .
144 .
145 .LP
146 If there is a downloadable font file for the font, it may be listed in
147 the file
148 .BR @FONTDIR@/devps/download ;
149 see
150 .BR grops (@MAN1EXT@).
151 .
152 .LP
153 If the
154 .B \-i
155 option is used,
156 .B afmtodit
157 will automatically generate an italic correction,
158 a left italic correction and a subscript correction
159 for each character
160 (the significance of these parameters is explained in
161 .BR groff_font (@MAN5EXT@));
162 these parameters may be specified for individual characters by
163 adding to the
164 .I afm_file
165 lines of the form:
166 .IP
167 .BI italicCorrection\  ps_char\ n
168 .br
169 .BI leftItalicCorrection\  ps_char\ n
170 .br
171 .BI subscriptCorrection\  ps_char\ n
172 .LP
173 where
174 .I ps_char
175 is the PostScript name of the character,
176 and
177 .I n
178 is the desired value of the corresponding parameter in thousandths of an em.
179 .
180 These parameters are normally needed only for italic (or oblique) fonts.
181 .
182 .
183 .SH OPTIONS
184 .TP
185 .BI \-a n
186 Use
187 .I n
188 as the slant parameter in the font file;
189 this is used by groff in the positioning of accents.
190 .
191 By default
192 .B afmtodit
193 uses the negative of the ItalicAngle specified in the afm file;
194 with true italic fonts it is sometimes desirable to use
195 a slant that is less than this.
196 .
197 If you find that characters from an italic font have accents
198 placed too far to the right over them,
199 then use the
200 .B \-a
201 option to give the font a smaller slant.
202 .
203 .TP
204 .BI \-d desc_file
205 The device description file is
206 .I desc_file
207 rather than the default
208 .BR DESC .
209 .
210 If not found in the current directory, the `devps' subdirectory of the
211 default font directory is searched (this is true for both the default
212 device description file and a file given with option
213 .BR \-d ).
214 .
215 .TP
216 .BI \-e enc_file
217 The PostScript font should be reencoded to use the encoding described
218 in enc_file.
219 .
220 The format of
221 .I enc_file
222 is described in
223 .BR grops (@MAN1EXT@).
224 .
225 If not found in the current directory, the `devps' subdirectory of the
226 default font directory is searched.
227 .
228 .TP
229 .BI \-i n
230 Generate an italic correction for each character so that 
231 the character's width plus the character's italic correction
232 is equal to
233 .I n
234 thousandths of an em
235 plus the amount by which the right edge of the character's bounding box
236 is to the right of the character's origin.
237 .
238 If this would result in a negative italic correction, use a zero
239 italic correction instead.
240 .
241 .IP
242 Also generate a subscript correction equal to the 
243 product of the tangent of the slant of the font and
244 four fifths of the x-height of the font.
245 .
246 If this would result in a subscript correction greater than the italic
247 correction, use a subscript correction equal to the italic correction
248 instead.
249 .
250 .IP
251 Also generate a left italic correction for each character
252 equal to
253 .I n
254 thousandths of an em
255 plus the amount by which the left edge of the character's bounding box
256 is to the left of the character's origin.
257 .
258 The left italic correction may be negative unless option
259 .B \-m
260 is given.
261 .
262 .IP
263 This option is normally needed only with italic (or oblique) fonts.
264 .
265 The font files distributed with groff were created using an option of
266 .B \-i50
267 for italic fonts.
268 .
269 .TP
270 .B \-m
271 Prevent negative left italic correction values.
272 .
273 Roman font files distributed with groff were created with
274 .B \-i0\ \-m
275 to improve spacing with
276 .BR @g@eqn (@MAN1EXT@).
277 .
278 .TP
279 .B \-n
280 Don't output a
281 .B ligatures
282 command for this font.
283 .
284 Use this with constant-width fonts.
285 .
286 .TP
287 .B \-s
288 The font is special.
289 .
290 The effect of this option is to add the
291 .B special
292 command to the font file.
293 .
294 .TP
295 .B \-v
296 Print version.
297 .
298 .TP
299 .B \-x
300 Don't use the built-in Adobe Glyph List.
301 .
302 .
303 .SH FILES
304 .Tp \w'\fB@FONTDIR@/devps/download'u+2n
305 .B @FONTDIR@/devps/DESC
306 Device description file.
307 .
308 .TP
309 .BI @FONTDIR@/devps/ F
310 Font description file for font
311 .IR F .
312 .
313 .TP
314 .B @FONTDIR@/devps/download
315 List of downloadable fonts.
316 .
317 .TP
318 .B @FONTDIR@/devps/text.enc
319 Encoding used for text fonts.
320 .
321 .TP
322 .B @FONTDIR@/devps/generate/textmap
323 Standard mapping.
324 .
325 .
326 .SH "SEE ALSO"
327 .BR groff (@MAN1EXT@),
328 .BR grops (@MAN1EXT@),
329 .BR groff_font (@MAN5EXT@),
330 .BR perl (1)
331 .
332 .LP
333 The groff info file, section `Using Symbols'.
334 .
335 .\" Local Variables:
336 .\" mode: nroff
337 .\" End: