Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / groff / src / utils / afmtodit / afmtodit.man
1 .ig
2 Copyright (C) 1989-2000, 2001, 2002 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 .
29 .TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
30 .
31 .
32 .SH NAME
33 afmtodit \- create font files for use with groff \-Tps
34 .
35 .
36 .SH SYNOPSIS
37 .nr a \n(.j
38 .ad l
39 .nr i \n(.i
40 .in +\w'\fBafmtodit 'u
41 .ti \niu
42 .B afmtodit
43 .de OP
44 .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
45 .el .RB "[\ " "\\$1" "\ ]"
46 ..
47 .
48 .OP \-nsv
49 .OP \-d desc_file
50 .OP \-e enc_file
51 .OP \-i n
52 .OP \-a n
53 .I afm_file
54 .I map_file
55 .I font
56 .br
57 .ad \na
58 .
59 .
60 .SH DESCRIPTION
61 .B afmtodit
62 creates a font file for use with groff and
63 .BR grops .
64 .
65 .B afmtodit
66 is written in perl;
67 you must have perl version 3 or newer installed in order to run
68 .BR afmtodit .
69 .
70 .I afm_file
71 is the AFM (Adobe Font Metric) file for the font.
72 .
73 .I map_file
74 is a file that says which groff character names map onto
75 each PostScript character name;
76 this file should contain a sequence of lines of the form
77 .IP
78 .I
79 ps_char groff_char
80 .LP
81 where
82 .I ps_char
83 is the PostScript name of the character
84 and
85 .I groff_char
86 is the groff name of the character (as used in the groff font file).
87 .
88 The same
89 .I ps_char
90 can occur multiple times in the file;
91 each
92 .I groff_char
93 must occur at most once.
94 .
95 Lines starting with
96 .B #
97 and blank lines are ignored.
98 .
99 .I font
100 is the groff name of the font.
101 .
102 If a PostScript character is in the encoding to be used for the font
103 but is not mentioned in
104 .I map_file
105 then
106 .B afmtodit
107 will put it in the groff font file as an unnamed character,
108 which can be accessed by the
109 .B \eN
110 escape sequence in
111 .BR troff .
112 .
113 The groff font file will be output to a file called
114 .IR font .
115 .
116 .LP
117 If there is a downloadable font file for the font, it may be listed in
118 the file
119 .BR @FONTDIR@/devps/download ;
120 see
121 .BR grops (@MAN1EXT@).
122 .
123 .LP
124 If the
125 .B \-i
126 option is used,
127 .B afmtodit
128 will automatically generate an italic correction,
129 a left italic correction and a subscript correction
130 for each character
131 (the significance of these parameters is explained in
132 .BR groff_font (@MAN5EXT@));
133 these parameters may be specified for individual characters by
134 adding to the
135 .I afm_file
136 lines of the form:
137 .IP
138 .BI italicCorrection\  ps_char\ n
139 .br
140 .BI leftItalicCorrection\  ps_char\ n
141 .br
142 .BI subscriptCorrection\  ps_char\ n
143 .LP
144 where
145 .I ps_char
146 is the PostScript name of the character,
147 and
148 .I n
149 is the desired value of the corresponding parameter in thousandths of an em.
150 .
151 These parameters are normally needed only for italic (or oblique) fonts.
152 .
153 .
154 .SH OPTIONS
155 .TP
156 .B \-v
157 Print version.
158 .
159 .TP
160 .B \-n
161 Don't output a
162 .B ligatures
163 command for this font.
164 .
165 Use this with constant-width fonts.
166 .
167 .TP
168 .B \-s
169 The font is special.
170 .
171 The effect of this option is to add the
172 .B special
173 command to the font file.
174 .
175 .TP
176 .BI \-d desc_file
177 The device description file is
178 .I desc_file
179 rather than the default
180 .BR DESC .
181 .
182 .TP
183 .BI \-e enc_file
184 The PostScript font should be reencoded to use the encoding described
185 in enc_file.
186 .
187 The format of
188 .I enc_file
189 is described in
190 .BR grops (@MAN1EXT@).
191 .
192 .TP
193 .BI \-a n
194 Use
195 .I n
196 as the slant parameter in the font file;
197 this is used by groff in the positioning of accents.
198 .
199 By default
200 .B afmtodit
201 uses the negative of the ItalicAngle specified in the afm file;
202 with true italic fonts it is sometimes desirable to use
203 a slant that is less than this.
204 .
205 If you find that characters from an italic font have accents
206 placed too far to the right over them,
207 then use the
208 .B \-a
209 option to give the font a smaller slant.
210 .
211 .TP
212 .BI \-i n
213 Generate an italic correction for each character so that 
214 the character's width plus the character's italic correction
215 is equal to
216 .I n
217 thousandths of an em
218 plus the amount by which the right edge of the character's bounding
219 is to the right of the character's origin.
220 .
221 If this would result in a negative italic correction, use a zero
222 italic correction instead.
223 .
224 .IP
225 Also generate a subscript correction equal to the 
226 product of the tangent of the slant of the font and
227 four fifths of the x-height of the font.
228 .
229 If this would result in a subscript correction greater than the italic
230 correction, use a subscript correction equal to the italic correction
231 instead.
232 .
233 .IP
234 Also generate a left italic correction for each character
235 equal to
236 .I n
237 thousandths of an em
238 plus the amount by which the left edge of the character's bounding box
239 is to the left of the character's origin.
240 .
241 The left italic correction may be negative.
242 .
243 .IP
244 This option is normally needed only with italic (or oblique) fonts.
245 .
246 The font files distributed with groff were created using an option of
247 .B \-i50
248 for italic fonts.
249 .
250 .
251 .SH FILES
252 .Tp \w'\fB@FONTDIR@/devps/download'u+2n
253 .B @FONTDIR@/devps/DESC
254 Device description file.
255 .
256 .TP
257 .BI @FONTDIR@/devps/ F
258 Font description file for font
259 .IR F .
260 .
261 .TP
262 .B @FONTDIR@/devps/download
263 List of downloadable fonts.
264 .
265 .TP
266 .B @FONTDIR@/devps/text.enc
267 Encoding used for text fonts.
268 .
269 .TP
270 .B @FONTDIR@/devps/generate/textmap
271 Standard mapping.
272 .
273 .
274 .SH "SEE ALSO"
275 .BR groff (@MAN1EXT@),
276 .BR grops (@MAN1EXT@),
277 .BR groff_font (@MAN5EXT@),
278 .BR perl (1)
279 .
280 .\" Local Variables:
281 .\" mode: nroff
282 .\" End: