groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / src / utils / afmtodit / afmtodit.man
CommitLineData
92d0a6a6 1.ig
4d3e9548
JL
2Copyright (C) 1989-2000, 2001, 2002, 2003, 2005, 2006, 2008, 2009
3 Free Software Foundation, Inc.
92d0a6a6
JR
4
5Permission is granted to make and distribute verbatim copies of
6this manual provided the copyright notice and this permission notice
7are preserved on all copies.
8
9Permission is granted to copy and distribute modified versions of this
10manual under the conditions for verbatim copying, provided that the
11entire resulting derived work is distributed under the terms of a
12permission notice identical to this one.
13
14Permission is granted to copy and distribute translations of this
15manual into another language, under the above conditions for modified
16versions, except that this permission notice may be included in
17translations approved by the Free Software Foundation instead of in
18the original English.
19..
20.
21.
22.\" Like TP, but if specified indent is more than half
23.\" the current line-length - indent, use the default indent.
24.de Tp
25. ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
26. el .TP "\\$1"
27..
28.
29.de OP
30. ie \\n(.$-1 .RI "[\ \fB\\$1\fP\ " "\\$2" "\ ]"
31. el .RB "[\ " "\\$1" "\ ]"
32..
33.
34.
35.TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
36.
37.
38.SH NAME
39afmtodit \- create font files for use with groff \-Tps
40.
41.
42.SH SYNOPSIS
43.nr a \n(.j
44.ad l
45.nr i \n(.i
46.in +\w'\fBafmtodit 'u
47.ti \niu
48.B afmtodit
4d3e9548 49.OP \-ckmnsvx
92d0a6a6
JR
50.OP \-a n
51.OP \-d desc_file
52.OP \-e enc_file
4d3e9548 53.OP \-f internal_name
92d0a6a6
JR
54.OP \-i n
55.I afm_file
56.I map_file
57.I font
58.br
59.ad \na
60.
61.LP
4d3e9548 62The whitespace between a command line option and its argument is optional.
92d0a6a6
JR
63.
64.SH DESCRIPTION
65.B afmtodit
66creates a font file for use with groff and
67.BR grops .
68.
69.B afmtodit
70is written in perl;
465b256c 71you must have perl version 5.004 or newer installed in order to run
92d0a6a6
JR
72.BR afmtodit .
73.
74.LP
75.I afm_file
76is the AFM (Adobe Font Metric) file for the font.
77.
78.LP
79.I map_file
80is a file that says which groff character names map onto
81each PostScript character name;
82this file should contain a sequence of lines of the form
83.IP
84.I
85ps_char groff_char
86.LP
87where
88.I ps_char
89is the PostScript name of the character
90and
91.I groff_char
92is the groff name of the character (as used in the groff font file).
93.
94The same
95.I ps_char
96can occur multiple times in the file;
97each
98.I groff_char
99must occur at most once.
100.
101Lines starting with
102.B #
103and blank lines are ignored.
104.
105If the file isn't found in the current directory, it is searched in
106the `devps/generate' subdirectory of the default font directory.
107.
108.LP
4d3e9548 109If a PostScript character is not mentioned in
92d0a6a6
JR
110.IR map_file ,
111and a generic groff glyph name can't be deduced using the
112Adobe Glyph List (AGL, built into
4d3e9548 113.BR afmtodit ),
92d0a6a6
JR
114then
115.B afmtodit
116puts the PostScript character into the groff font file as an unnamed
117character which can only be accessed by the
118.B \eN
119escape sequence in
120.BR troff .
4d3e9548
JL
121In particular, this is true for glyph variants like `foo.bar'; all glyph
122names containing one or more periods are mapped to unnamed entities.
92d0a6a6
JR
123.
124If option
125.B \-e
126is not specified, the encoding defined in the AFM file (i.e., entries
127with non-negative character codes) is used.
128.
129Please refer to section `Using Symbols' in the groff info file which
130describes how groff glyph names are constructed.
131.
132.LP
133Characters not encoded in the AFM file (i.e., entries which have \-1 as
134the character code) are still available in groff; they get glyph index
135values greater than 255 (or greater than the biggest character code used
136in the AFM file in the unlikely case that it is greater than 255) in the
137groff font file.
138.
139Glyph indices of unencoded characters don't have a specific order; it
140is best to access them with glyph names only.
141.
142.LP
143The groff font file will be output to a file called
144.IR font .
145.
146.LP
147If there is a downloadable font file for the font, it may be listed in
148the file
149.BR @FONTDIR@/devps/download ;
150see
151.BR grops (@MAN1EXT@).
152.
153.LP
154If the
155.B \-i
156option is used,
157.B afmtodit
158will automatically generate an italic correction,
159a left italic correction and a subscript correction
160for each character
161(the significance of these parameters is explained in
162.BR groff_font (@MAN5EXT@));
163these parameters may be specified for individual characters by
164adding to the
165.I afm_file
166lines of the form:
167.IP
168.BI italicCorrection\ ps_char\ n
169.br
170.BI leftItalicCorrection\ ps_char\ n
171.br
172.BI subscriptCorrection\ ps_char\ n
173.LP
174where
175.I ps_char
176is the PostScript name of the character,
177and
178.I n
179is the desired value of the corresponding parameter in thousandths of an em.
180.
181These parameters are normally needed only for italic (or oblique) fonts.
182.
183.
184.SH OPTIONS
185.TP
186.BI \-a n
187Use
188.I n
189as the slant parameter in the font file;
190this is used by groff in the positioning of accents.
191.
192By default
193.B afmtodit
194uses the negative of the ItalicAngle specified in the afm file;
195with true italic fonts it is sometimes desirable to use
196a slant that is less than this.
197.
198If you find that characters from an italic font have accents
199placed too far to the right over them,
200then use the
201.B \-a
202option to give the font a smaller slant.
203.
204.TP
4d3e9548
JL
205.B \-c
206Include comments in the font file in order to identify the PS font.
207.
208.TP
92d0a6a6
JR
209.BI \-d desc_file
210The device description file is
211.I desc_file
212rather than the default
213.BR DESC .
214.
215If not found in the current directory, the `devps' subdirectory of the
216default font directory is searched (this is true for both the default
217device description file and a file given with option
218.BR \-d ).
219.
220.TP
221.BI \-e enc_file
222The PostScript font should be reencoded to use the encoding described
223in enc_file.
224.
225The format of
226.I enc_file
227is described in
228.BR grops (@MAN1EXT@).
229.
230If not found in the current directory, the `devps' subdirectory of the
231default font directory is searched.
232.
233.TP
4d3e9548
JL
234.BI \-f name
235The internal name of the groff font is set to
236.IR name .
237.
238.TP
92d0a6a6
JR
239.BI \-i n
240Generate an italic correction for each character so that
241the character's width plus the character's italic correction
242is equal to
243.I n
244thousandths of an em
245plus the amount by which the right edge of the character's bounding box
246is to the right of the character's origin.
247.
248If this would result in a negative italic correction, use a zero
249italic correction instead.
250.
251.IP
252Also generate a subscript correction equal to the
253product of the tangent of the slant of the font and
254four fifths of the x-height of the font.
255.
256If this would result in a subscript correction greater than the italic
257correction, use a subscript correction equal to the italic correction
258instead.
259.
260.IP
261Also generate a left italic correction for each character
262equal to
263.I n
264thousandths of an em
265plus the amount by which the left edge of the character's bounding box
266is to the left of the character's origin.
267.
268The left italic correction may be negative unless option
269.B \-m
270is given.
271.
272.IP
273This option is normally needed only with italic (or oblique) fonts.
274.
275The font files distributed with groff were created using an option of
276.B \-i50
277for italic fonts.
278.
279.TP
4d3e9548
JL
280.B \-k
281Omit any kerning data from the groff font.
282This should be used only for mono-spaced fonts.
283.
284.TP
92d0a6a6
JR
285.B \-m
286Prevent negative left italic correction values.
287.
288Roman font files distributed with groff were created with
289.B \-i0\ \-m
290to improve spacing with
291.BR @g@eqn (@MAN1EXT@).
292.
293.TP
294.B \-n
295Don't output a
296.B ligatures
297command for this font.
298.
299Use this with constant-width fonts.
300.
301.TP
302.B \-s
303The font is special.
304.
305The effect of this option is to add the
306.B special
307command to the font file.
308.
309.TP
310.B \-v
311Print version.
312.
313.TP
314.B \-x
315Don't use the built-in Adobe Glyph List.
316.
317.
318.SH FILES
319.Tp \w'\fB@FONTDIR@/devps/download'u+2n
320.B @FONTDIR@/devps/DESC
321Device description file.
322.
323.TP
324.BI @FONTDIR@/devps/ F
325Font description file for font
326.IR F .
327.
328.TP
329.B @FONTDIR@/devps/download
330List of downloadable fonts.
331.
332.TP
333.B @FONTDIR@/devps/text.enc
334Encoding used for text fonts.
335.
336.TP
337.B @FONTDIR@/devps/generate/textmap
338Standard mapping.
339.
340.
341.SH "SEE ALSO"
342.BR groff (@MAN1EXT@),
343.BR grops (@MAN1EXT@),
344.BR groff_font (@MAN5EXT@),
345.BR perl (1)
346.
347.LP
348The groff info file, section `Using Symbols'.
349.
350.\" Local Variables:
351.\" mode: nroff
352.\" End: