1.ig
2Copyright (C) 1989-2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
3
4Permission is granted to make and distribute verbatim copies of
5this manual provided the copyright notice and this permission notice
6are preserved on all copies.
7
8Permission is granted to copy and distribute modified versions of this
9manual under the conditions for verbatim copying, provided that the
10entire resulting derived work is distributed under the terms of a
11permission notice identical to this one.
12
13Permission is granted to copy and distribute translations of this
14manual into another language, under the above conditions for modified
15versions, except that this permission notice may be included in
16translations approved by the Free Software Foundation instead of in
17the 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
38afmtodit \- 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
60The whitespace between an command line option and its argument is optional.
61.
62.SH DESCRIPTION
63.B afmtodit
64creates a font file for use with groff and
65.BR grops .
66.
67.B afmtodit
68is written in perl;
69you must have perl version 5.004 or newer installed in order to run
70.BR afmtodit .
71.
72.LP
73.I afm_file
74is the AFM (Adobe Font Metric) file for the font.
75.
76.LP
77.I map_file
78is a file that says which groff character names map onto
79each PostScript character name;
80this file should contain a sequence of lines of the form
81.IP
82.I
83ps_char groff_char
84.LP
85where
86.I ps_char
87is the PostScript name of the character
88and
89.I groff_char
90is the groff name of the character (as used in the groff font file).
91.
92The same
93.I ps_char
94can occur multiple times in the file;
95each
96.I groff_char
97must occur at most once.
98.
99Lines starting with
100.B #
101and blank lines are ignored.
102.
103If the file isn't found in the current directory, it is searched in
104the `devps/generate' subdirectory of the default font directory.
105.
106.LP
107If a PostScript character is not named as
108.BI uni XXXX
109.RI ( XXXX
110are four uppercase hexadecimal digits), and is not mentioned in
111.IR map_file ,
112and a generic groff glyph name can't be deduced using the
113Adobe Glyph List (AGL, built into
114.BR  afmtodit ),
115then
116.B afmtodit
117puts the PostScript character into the groff font file as an unnamed
118character which can only be accessed by the
119.B \eN
120escape sequence in
121.BR troff .
122.
123If option
124.B \-e
125is not specified, the encoding defined in the AFM file (i.e., entries
126with non-negative character codes) is used.
127.
128Please refer to section `Using Symbols' in the groff info file which
129describes how groff glyph names are constructed.
130.
131.LP
132Characters not encoded in the AFM file (i.e., entries which have \-1 as
133the character code) are still available in groff; they get glyph index
134values greater than 255 (or greater than the biggest character code used
135in the AFM file in the unlikely case that it is greater than 255) in the
136groff font file.
137.
138Glyph indices of unencoded characters don't have a specific order; it
139is best to access them with glyph names only.
140.
141.LP
142The groff font file will be output to a file called
143.IR font .
144.
145.LP
146If there is a downloadable font file for the font, it may be listed in
147the file
148.BR @FONTDIR@/devps/download ;
149see
150.BR grops (@MAN1EXT@).
151.
152.LP
153If the
154.B \-i
155option is used,
156.B afmtodit
157will automatically generate an italic correction,
158a left italic correction and a subscript correction
159for each character
160(the significance of these parameters is explained in
161.BR groff_font (@MAN5EXT@));
162these parameters may be specified for individual characters by
163adding to the
164.I afm_file
165lines 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
173where
174.I ps_char
175is the PostScript name of the character,
176and
177.I n
178is the desired value of the corresponding parameter in thousandths of an em.
179.
180These parameters are normally needed only for italic (or oblique) fonts.
181.
182.
183.SH OPTIONS
184.TP
185.BI \-a n
186Use
187.I n
188as the slant parameter in the font file;
189this is used by groff in the positioning of accents.
190.
191By default
192.B afmtodit
193uses the negative of the ItalicAngle specified in the afm file;
194with true italic fonts it is sometimes desirable to use
195a slant that is less than this.
196.
197If you find that characters from an italic font have accents
198placed too far to the right over them,
199then use the
200.B \-a
201option to give the font a smaller slant.
202.
203.TP
204.BI \-d desc_file
205The device description file is
206.I desc_file
207rather than the default
208.BR DESC .
209.
210If not found in the current directory, the `devps' subdirectory of the
211default font directory is searched (this is true for both the default
212device description file and a file given with option
213.BR \-d ).
214.
215.TP
216.BI \-e enc_file
217The PostScript font should be reencoded to use the encoding described
218in enc_file.
219.
220The format of
221.I enc_file
222is described in
223.BR grops (@MAN1EXT@).
224.
225If not found in the current directory, the `devps' subdirectory of the
226default font directory is searched.
227.
228.TP
229.BI \-i n
230Generate an italic correction for each character so that 
231the character's width plus the character's italic correction
232is equal to
233.I n
234thousandths of an em
235plus the amount by which the right edge of the character's bounding box
236is to the right of the character's origin.
237.
238If this would result in a negative italic correction, use a zero
239italic correction instead.
240.
241.IP
242Also generate a subscript correction equal to the 
243product of the tangent of the slant of the font and
244four fifths of the x-height of the font.
245.
246If this would result in a subscript correction greater than the italic
247correction, use a subscript correction equal to the italic correction
248instead.
249.
250.IP
251Also generate a left italic correction for each character
252equal to
253.I n
254thousandths of an em
255plus the amount by which the left edge of the character's bounding box
256is to the left of the character's origin.
257.
258The left italic correction may be negative unless option
259.B \-m
260is given.
261.
262.IP
263This option is normally needed only with italic (or oblique) fonts.
264.
265The font files distributed with groff were created using an option of
266.B \-i50
267for italic fonts.
268.
269.TP
270.B \-m
271Prevent negative left italic correction values.
272.
273Roman font files distributed with groff were created with
274.B \-i0\ \-m
275to improve spacing with
276.BR @g@eqn (@MAN1EXT@).
277.
278.TP
279.B \-n
280Don't output a
281.B ligatures
282command for this font.
283.
284Use this with constant-width fonts.
285.
286.TP
287.B \-s
288The font is special.
289.
290The effect of this option is to add the
291.B special
292command to the font file.
293.
294.TP
295.B \-v
296Print version.
297.
298.TP
299.B \-x
300Don'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
306Device description file.
307.
308.TP
309.BI @FONTDIR@/devps/ F
310Font description file for font
311.IR F .
312.
313.TP
314.B @FONTDIR@/devps/download
315List of downloadable fonts.
316.
317.TP
318.B @FONTDIR@/devps/text.enc
319Encoding used for text fonts.
320.
321.TP
322.B @FONTDIR@/devps/generate/textmap
323Standard 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
333The groff info file, section `Using Symbols'.
334.
335.\" Local Variables:
336.\" mode: nroff
337.\" End:
338