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