Imported Upstream version 1.22.4
[platform/upstream/groff.git] / src / utils / afmtodit / afmtodit.1.man
1 .TH AFMTODIT @MAN1EXT@ "@MDATE@" "groff @VERSION@"
2 .SH NAME
3 afmtodit \- create font files for use with groff \-Tps and \-Tpdf
4 .
5 .
6 .\" ====================================================================
7 .\" Legal Terms
8 .\" ====================================================================
9 .\"
10 .\" Copyright (C) 1989-2018 Free Software Foundation, Inc.
11 .\"
12 .\" Permission is granted to make and distribute verbatim copies of this
13 .\" manual provided the copyright notice and this permission notice are
14 .\" preserved on all copies.
15 .\"
16 .\" Permission is granted to copy and distribute modified versions of
17 .\" this manual under the conditions for verbatim copying, provided that
18 .\" the entire resulting derived work is distributed under the terms of
19 .\" a permission notice identical to this one.
20 .\"
21 .\" Permission is granted to copy and distribute translations of this
22 .\" manual into another language, under the above conditions for
23 .\" modified versions, except that this permission notice may be
24 .\" included in translations approved by the Free Software Foundation
25 .\" instead of in the original English.
26 .
27 .
28 .\" ====================================================================
29 .SH SYNOPSIS
30 .\" ====================================================================
31 .
32 .SY afmtodit
33 .OP \-ckmnsx
34 .OP \-a n
35 .OP \-d desc-file
36 .OP \-e enc-file
37 .OP \-f internal-name
38 .OP \-i n
39 .OP \-o output-file
40 .I afm-file
41 .I map-file
42 .I font
43 .YS
44 .
45 .SY afmtodit
46 .B \-v
47 .YS
48 .
49 .
50 .\" ====================================================================
51 .SH DESCRIPTION
52 .\" ====================================================================
53 .
54 .I afmtodit
55 creates a font file for use with
56 .IR groff ,
57 .IR grops ,
58 and
59 .IR gropdf .
60 .
61 .I afmtodit
62 is written in Perl;
63 you must have Perl version 5.004 or newer installed in order to run
64 .IR afmtodit .
65 .
66 .
67 .LP
68 .I afm-file
69 is the AFM (Adobe Font Metric) file for the font.
70 .
71 .
72 .LP
73 .I map-file
74 is a file that says which
75 .I groff
76 character names map onto each PostScript character name;
77 this file should contain a sequence of lines of the form
78 .
79 .RS
80 .I
81 ps-char groff-char
82 .RE
83 .
84 where
85 .I ps-char
86 is the PostScript name of the character and
87 .I groff-char
88 is the groff name of the character (as used in the
89 .I groff
90 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 \(oq#\(cq and blank lines are ignored.
100 .
101 If the file isn't found in the current directory,
102 it is searched for in the
103 .I devps/generate
104 subdirectory of the default font directory.
105 .
106 .
107 .LP
108 If a PostScript character is not mentioned in
109 .IR map-file ,
110 and a generic
111 .I groff
112 glyph name can't be deduced using the Adobe Glyph List
113 (AGL, built into
114 .IR afmtodit ),
115 then
116 .I afmtodit
117 puts the PostScript character into the
118 .I groff
119 font file as an unnamed character which can only be accessed by the
120 \(oq\eN\(cq escape sequence in a
121 .I roff
122 document.
123 .
124 In particular,
125 this is true for glyph variants named in the form \(lqfoo.bar\(rq;
126 all glyph names containing one or more periods are mapped to unnamed
127 entities.
128 .
129 If option
130 .B \-e
131 is not specified, the encoding defined in the AFM file (i.e., entries
132 with non-negative character codes) is used.
133 .
134 Refer to section \(lqUsing Symbols\(rq in
135 .IR "Groff: The GNU Implementation of troff" ,
136 the
137 .I groff
138 Texinfo manual,
139 which describes how
140 .I groff
141 glyph names are constructed.
142 .
143 .
144 .LP
145 Characters not encoded in the AFM file (i.e., entries which have
146 \(oq\-1\(cq as the character code) are still available in
147 .IR groff ;
148 they get glyph index values greater than 255 (or greater than the
149 biggest character code used in the AFM file in the unlikely case that it
150 is greater than 255) in the
151 .I groff
152 font file.
153 .
154 Glyph indices of unencoded characters don't have a specific order;
155 it is best to access them with glyph names only.
156 .
157 .
158 .LP
159 The
160 .I groff
161 font file will be output to a file called
162 .IR font ,
163 unless the
164 .B \-o
165 option is used.
166 .
167 .
168 .LP
169 If there is a downloadable font file for the font, it may be listed in
170 the file
171 .IR @FONTDIR@/\:devps/\:download ;
172 see
173 .IR grops (@MAN1EXT@).
174 .
175 .
176 .LP
177 If the
178 .B \-i
179 option is used,
180 .I afmtodit
181 will automatically generate an italic correction,
182 a left italic correction and a subscript correction
183 for each character
184 (the significance of these parameters is explained in
185 .IR groff_font (@MAN5EXT@));
186 these parameters may be specified for individual characters by
187 adding to the
188 .I afm-file
189 lines of the form:
190 .
191 .RS
192 .EX
193 .BI italicCorrection \~ps-char\~n
194 .BI leftItalicCorrection \~ps-char\~n
195 .BI subscriptCorrection \~ps-char\~n
196 .EE
197 .RE
198 .
199 where
200 .I ps-char
201 is the PostScript name of the character,
202 and
203 .I n
204 is the desired value of the corresponding parameter in thousandths of an
205 em.
206 .
207 These parameters are normally needed only for italic (or oblique) fonts.
208 .
209 .
210 .\" ====================================================================
211 .SH OPTIONS
212 .\" ====================================================================
213 .
214 Whitespace is permitted between a command-line option and its argument.
215 .
216 .
217 .TP
218 .BI \-a n
219 Use
220 .I n
221 as the slant parameter in the font file;
222 this is used by
223 .I groff
224 in the positioning of accents.
225 .
226 By default
227 .I afmtodit
228 uses the negative of the
229 .B ItalicAngle
230 specified in the AFM file;
231 with true italic fonts it is sometimes desirable to use a slant that is
232 less than this.
233 .
234 If you find that characters from an italic font have accents placed too
235 far to the right over them,
236 then use the
237 .B \-a
238 option to give the font a smaller slant.
239 .
240 .
241 .TP
242 .B \-c
243 Include comments in the font file in order to identify the PostScript
244 font.
245 .
246 .
247 .TP
248 .BI \-d desc-file
249 The device description file is
250 .I desc-file
251 rather than the default
252 .IR DESC .
253 .
254 If not found in the current directory,
255 the
256 .I devps
257 subdirectory of the default font directory is searched (this is true for
258 both the default device description file and a file given with option
259 .BR \-d ).
260 .
261 .
262 .TP
263 .BI \-e enc-file
264 The PostScript font should be reencoded to use the encoding described
265 in
266 .IR enc-file .
267 .
268 The format of
269 .I enc-file
270 is described in
271 .IR grops (@MAN1EXT@).
272 .
273 If not found in the current directory,
274 the
275 .I devps
276 subdirectory of the default font directory is searched.
277 .
278 .
279 .TP
280 .BI \-f name
281 The internal name of the
282 .I groff
283 font is set to
284 .IR name .
285 .
286 .
287 .TP
288 .BI \-i n
289 Generate an italic correction for each character so that the
290 character's width plus the character's italic correction is equal to
291 .I n
292 thousandths of an em
293 plus the amount by which the right edge of the character's bounding box
294 is to the right of the character's origin.
295 .
296 If this would result in a negative italic correction, use a zero
297 italic correction instead.
298 .
299 .
300 .IP
301 Also generate a subscript correction equal to the
302 product of the tangent of the slant of the font and
303 four fifths of the x-height of the font.
304 .
305 If this would result in a subscript correction greater than the italic
306 correction, use a subscript correction equal to the italic correction
307 instead.
308 .
309 .
310 .IP
311 Also generate a left italic correction for each character
312 equal to
313 .I n
314 thousandths of an em
315 plus the amount by which the left edge of the character's bounding box
316 is to the left of the character's origin.
317 .
318 The left italic correction may be negative unless option
319 .B \-m
320 is given.
321 .
322 .
323 .IP
324 This option is normally needed only with italic (or oblique) fonts.
325 .
326 The font files distributed with
327 .I groff
328 were created using an option of
329 .B \-i50
330 for italic fonts.
331 .
332 .
333 .TP
334 .BI \-o output-file
335 The output file is
336 .I output-file
337 instead of
338 .IR font .
339 .
340 .
341 .TP
342 .B \-k
343 Omit any kerning data from the
344 .I groff
345 font;
346 use only for monospaced (constant-width) fonts.
347 .
348 .
349 .TP
350 .B \-m
351 Prevent negative left italic correction values.
352 .
353 Roman font files distributed with
354 .I groff
355 were created with
356 .B \-i0\ \-m
357 to improve spacing with
358 .IR @g@eqn (@MAN1EXT@).
359 .
360 .
361 .TP
362 .B \-n
363 Don't output a
364 .B ligatures
365 command for this font;
366 use with monospaced (constant-width) fonts.
367 .
368 .
369 .TP
370 .B \-s
371 The font is special.
372 .
373 The effect of this option is to add the
374 .B special
375 command to the font file.
376 .
377 .
378 .TP
379 .B \-v
380 Print version and exit.
381 .
382 .
383 .TP
384 .B \-x
385 Don't use the built-in Adobe Glyph List.
386 .
387 .
388 .\" ====================================================================
389 .SH FILES
390 .\" ====================================================================
391 .
392 .TP
393 .I @FONTDIR@/\:devps/\:DESC
394 Device description file.
395 .
396 .
397 .TP
398 .IR @FONTDIR@/\:devps/\: F
399 Font description file for font
400 .IR F .
401 .
402 .
403 .TP
404 .I @FONTDIR@/\:devps/\:download
405 List of downloadable fonts.
406 .
407 .
408 .TP
409 .I @FONTDIR@/\:devps/\:text.enc
410 Encoding used for text fonts.
411 .
412 .
413 .TP
414 .I @FONTDIR@/\:devps/\:generate/\:textmap
415 Standard mapping.
416 .
417 .
418 .\" ====================================================================
419 .SH "SEE ALSO"
420 .\" ====================================================================
421 .
422 .IR "Groff: The GNU Implementation of troff" ,
423 by Trent A.\& Fisher and Werner Lemberg,
424 is the primary
425 .I groff
426 manual.
427 .
428 Section \(lqUsing Symbols\(rq may be of particular note.
429 .
430 You can browse it interactively with \(lqinfo \(aq(groff)Using
431 Symbols\(aq\(rq.
432 .
433 .
434 .LP
435 .IR groff (@MAN1EXT@),
436 .IR gropdf (@MAN1EXT@),
437 .IR grops (@MAN1EXT@),
438 .IR groff_font (@MAN5EXT@),
439 .IR perl (1)
440 .
441 .
442 .\" ====================================================================
443 .\" ### Emacs settings:
444 .\" Local Variables:
445 .\" mode: nroff
446 .\" fill-column: 72
447 .\" End:
448 .\" vim: set filetype=groff textwidth=72: