groff before CVS: release 1.06
[s-roff.git] / afmtodit / afmtodit.man
blobdd83afd03ef7f4034917034b7868ef52136aac5d
1 .\" -*- nroff -*-
2 .\" Like TP, but if specified indent is more than half
3 .\" the current line-length - indent, use the default indent.
4 .de Tp
5 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
6 .el .TP "\\$1"
7 ..
8 .TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
9 .SH NAME
10 afmtodit \- create font files for use with groff \-Tps
11 .SH SYNOPSIS
12 .B afmtodit
14 .B \-ns
17 .BI \-d desc_file
20 .BI \-e enc_file
23 .BI \-i n
26 .BI \-a n
28 .I afm_file
29 .I map_file
30 .I font
31 .SH DESCRIPTION
32 .B afmtodit
33 creates a font file for use with groff and
34 .BR grops .
35 .B afmtodit
36 is written in perl;
37 you must have perl version 3 installed in order to run
38 .BR afmtodit .
39 .I afm_file
40 is the AFM (Adobe Font Metric) file for the font.
41 .I map_file
42 is a file that says which groff character names map onto
43 each PostScript character name;
44 this file should contain a sequence of lines of the form
45 .IP
47 ps_char groff_char
48 .LP
49 where
50 .I ps_char
51 is the PostScript name of the character
52 and
53 .I groff_char
54 is the groff name of the character (as used in the groff font file.)
55 The same
56 .I ps_char
57 can occur multiple times in the file;
58 each
59 .I groff_char
60 must occur at most once.
61 .I font
62 is the groff name of the font.
63 If a PostScript character is in the encoding to be used for the font
64 but is not mentioned in
65 .I map_file
66 then
67 .B afmtodit
68 will put it in the groff font file as an unnamed character,
69 which can be accessed by the
70 .B \eN
71 escape sequence in
72 .BR troff .
73 The groff font file will be output to a file called
74 .IR font .
75 .LP
76 If there is a downloadable font file for the font, it may be listed in
77 the file
78 .BR @FONTDIR@/devps/download ;
79 see
80 .BR grops (@MAN1EXT@).
81 .LP
82 If the
83 .B \-i
84 option is used,
85 .B afmtodit
86 will automatically generate an italic correction,
87 a left italic correction and a subscript correction
88 for each character
89 (the significance of these parameters is explained in
90 .BR groff_font (@MAN5EXT@));
91 these parameters may be specified for individual characters by
92 adding to the
93 .I afm_file
94 lines of the form:
95 .IP
96 .BI italicCorrection\  ps_char\ n
97 .br
98 .BI leftItalicCorrection\  ps_char\ n
99 .br
100 .BI subscriptCorrection\  ps_char\ n
102 where
103 .I ps_char
104 is the PostScript name of the character,
106 .I n
107 is the desired value of the corresponding parameter in thousandths of an em.
108 These parameters are normally needed only for italic (or oblique) fonts.
109 .SH OPTIONS
111 .B \-n
112 Don't output a
113 .B ligatures
114 command for this font.
115 Use this with constant-width fonts.
117 .B \-s
118 The font is special.
119 The effect of this option is to add the
120 .B special
121 command to the font file.
123 .BI \-d desc_file
124 The device description file is
125 .I desc_file
126 rather than the default
127 .BR DESC .
129 .BI \-e enc_file
130 The PostScript font should be reencoded to use the encoding described
131 in enc_file.
132 The format of
133 .I enc_file
134 is described in
135 .BR grops (@MAN1EXT@).
137 .BI \-a n
139 .I n
140 as the slant parameter in the font file;
141 this is used by groff in the positioning of accents.
142 By default
143 .B afmtodit
144 uses the negative of the ItalicAngle specified in the afm file;
145 with true italic fonts it is sometimes desirable to use
146 a slant that is less than this.
147 If you find that characters from an italic font have accents
148 placed too far to the right over them,
149 then use the
150 .B \-a
151 option to give the font a smaller slant.
153 .BI \-i n
154 Generate an italic correction for each character so that 
155 the character's width plus the character's italic correction
156 is equal to
157 .I n
158 thousandths of an em
159 plus the amount by which the right edge of the character's bounding
160 is to the right of the character's origin.
161 If this would result in a negative italic correction, use a zero
162 italic correction instead.
164 Also generate a subscript correction equal to the 
165 product of the tangent of the slant of the font and
166 four fifths of the x-height of the font.
167 If this would result in a subscript correction greater than the italic
168 correction, use a subscript correction equal to the italic correction
169 instead.
171 Also generate a left italic correction for each character
172 equal to
173 .I n
174 thousandths of an em
175 plus the amount by which the left edge of the character's bounding box
176 is to the left of the character's origin.
177 The left italic correction may be negative.
179 This option is normally needed only with italic (or oblique) fonts.
180 The font files distributed with groff were created using an option of
181 .B \-i50
182 for italic fonts.
183 .SH FILES
184 .Tp \w'\fB@FONTDIR@/devps/download'u+2n
185 .B @FONTDIR@/devps/DESC
186 Device desciption file.
188 .BI @FONTDIR@/devps/ F
189 Font description file for font
190 .IR F .
192 .B @FONTDIR@/devps/download
193 List of downloadable fonts.
195 .B @FONTDIR@/devps/text.enc
196 Encoding used for text fonts.
198 .B @FONTDIR@/devps/textmap
199 Standard mapping.
200 .SH "SEE ALSO"
201 .BR groff (@MAN1EXT@),
202 .BR grops (@MAN1EXT@),
203 .BR groff_font (@MAN5EXT@),
204 .BR perl (1)