Imported Upstream version 1.22.3
[platform/upstream/groff.git] / src / utils / tfmtodit / tfmtodit.man
1 .TH TFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
2 .SH NAME
3 tfmtodit \- create font files for use with groff \-Tdvi
4 .
5 .
6 .\" --------------------------------------------------------------------
7 .\" Legal Terms
8 .\" --------------------------------------------------------------------
9 .
10 .de co
11 Copyright \[co] 1989-2014 Free Software Foundation, Inc.
12
13 Permission is granted to make and distribute verbatim copies of
14 this manual provided the copyright notice and this permission notice
15 are preserved on all copies.
16
17 Permission is granted to copy and distribute modified versions of this
18 manual under the conditions for verbatim copying, provided that the
19 entire resulting derived work is distributed under the terms of a
20 permission notice identical to this one.
21
22 Permission is granted to copy and distribute translations of this
23 manual into another language, under the above conditions for modified
24 versions, except that this permission notice may be included in
25 translations approved by the Free Software Foundation instead of in
26 the original English.
27 ..
28 .
29 .\" --------------------------------------------------------------------
30 .\" Definitions
31 .\" --------------------------------------------------------------------
32 .
33 .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
34 .el .ds tx TeX
35 .\" Like TP, but if specified indent is more than half
36 .\" the current line-length - indent, use the default indent.
37 .de Tp
38 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
39 .el .TP "\\$1"
40 ..
41 .
42 .
43 .\" --------------------------------------------------------------------
44 .SH SYNOPSIS
45 .\" --------------------------------------------------------------------
46 .
47 nr a \n(.j
48 .ad l
49 .nr i \n(.i
50 .in +\w'\fBtfmtodit 'u
51 .ti \niu
52 .B tfmtodit
53 .de OP
54 .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
55 .el .RB "[\ " "\\$1" "\ ]"
56 ..
57 .OP \-sv
58 .OP \-g gf_file
59 .OP \-k skewchar
60 .I tfm_file
61 .I map_file
62 .I font
63 .br
64 .ad \na
65 .
66 .
67 .\" --------------------------------------------------------------------
68 .SH DESCRIPTION
69 .\" --------------------------------------------------------------------
70 .
71 .B tfmtodit
72 creates a font file for use with
73 .B
74 groff \-Tdvi\fR.
75 .
76 .I tfm_file
77 is the name of the \*(tx font metric file for the font.
78 .
79 .I map_file
80 is a file giving the groff names for characters in the font;
81 this file should consist of a sequence of lines of the form:
82 .IP
83 .I
84 n c1 c2 \fR.\|.\|.
85 .
86 .
87 .LP
88 where
89 .I n
90 is a decimal integer giving the position of the character in the font,
91 and
92 .IR c1 ,
93 .IR c2 ,.\|.\|.
94 are the groff names of the character.
95 .
96 If a character has no groff names but exists in the tfm file,
97 then it will be put in the groff font file as an unnamed character.
98 .
99 .I font
100 is the name of the groff font file.
101 .
102 The groff font file is written to
103 .IR font .
104 .
105 .
106 .LP
107 The
108 .B \-s
109 option should be given if the font is special
110 (a font is
111 .I special
112 if
113 .B troff
114 should search it whenever
115 a character is not found in the current font.)
116 .
117 If the font is special,
118 it should be listed in the
119 .B fonts
120 command in the DESC file;
121 if it is not special, there is no need to list it, since
122 .B troff
123 can automatically mount it when it\[aq]s first used.
124 .
125 .
126 .LP
127 To do a good job of math typesetting, groff requires font metric
128 information not present in the tfm file.
129 .
130 The reason for this is that \*(tx has separate math italic fonts
131 whereas groff uses normal italic fonts for math.
132 .
133 The additional information required by groff is given by the two
134 arguments to the
135 .B math_fit
136 macro in the Metafont programs for the Computer Modern fonts.
137 .
138 In a text font (a font for which
139 .B math_fitting
140 is false), Metafont normally ignores these two arguments.
141 .
142 Metafont can be made to put this information in the gf file by loading
143 the following definition after
144 .B cmbase
145 when creating
146 .BR cm.base :
147 .IP
148 .nf
149 .ft B
150 def ignore_math_fit(expr left_adjustment,right_adjustment) =
151     special "adjustment";
152     numspecial left_adjustment*16/designsize;
153     numspecial right_adjustment*16/designsize;
154     enddef;
155 .fi
156 .ft R
157 .LP
158 For the EC font family, load the following definition after
159 .B exbase
160 (it is probably easiest to patch
161 .B exbase.mf
162 locally):
163 .IP
164 .nf
165 .ft B
166 def ignore_math_fit(expr left_adjustment,right_adjustment) =
167     ori_special "adjustment";
168     ori_numspecial left_adjustment*16/designsize;
169     ori_numspecial right_adjustment*16/designsize;
170     enddef;
171 .fi
172 .ft R
173 .LP
174 The gf file created using this modified
175 .B cm.base
176 or
177 .B exbase
178 should be specified with the
179 .B \-g
180 option.
181 .
182 The
183 .B \-g
184 option should not be given for a font for which
185 .B math_fitting
186 is true.
187 .
188 .
189 .\" --------------------------------------------------------------------
190 .SH OPTIONS
191 .\" --------------------------------------------------------------------
192 .
193 It is possible to have whitespace between a command line option and its
194 parameter.
195 .
196 .TP
197 .B \-v
198 Print the version number.
199 .
200 .TP
201 .B \-s
202 The font is special.
203 .
204 The effect of this option is to add the
205 .B special
206 command to the font file.
207 .
208 .TP
209 .BI \-k n
210 The skewchar of this font is at position
211 .IR n .
212 .
213 .I n
214 should be an integer;
215 it may be given in decimal,
216 or with a leading
217 .B 0
218 in octal,
219 or with a leading
220 .B 0x
221 in hexadecimal.
222 .
223 The effect of this option is to ignore any kerns whose second
224 component is the specified character.
225 .
226 .TP
227 .BI \-g gf_file
228 .I gf_file
229 is a gf file produced by Metafont containing special and numspecial
230 commands giving additional font metric information.
231 .
232 .
233 .\" --------------------------------------------------------------------
234 .SH FILES
235 .\" --------------------------------------------------------------------
236 .
237 .Tp \w'\fB@FONTDIR@/devdvi/DESC'u+2n
238 .B @FONTDIR@/devdvi/DESC
239 Device description file.
240 .
241 .TP
242 .BI @FONTDIR@/devdvi/ F
243 Font description file for font
244 .IR F .
245 .
246 .
247 .\" --------------------------------------------------------------------
248 .SH "SEE ALSO"
249 .\" --------------------------------------------------------------------
250 .BR groff (@MAN1EXT@),
251 .BR grodvi (@MAN1EXT@),
252 .BR groff_font (@MAN5EXT@)
253 .
254 .
255 .\" --------------------------------------------------------------------
256 .SH COPYING
257 .\" --------------------------------------------------------------------
258 .co
259 .
260 .
261 .\" Local Variables:
262 .\" mode: nroff
263 .\" End: