Imported Upstream version 1.23.0
[platform/upstream/groff.git] / src / utils / tfmtodit / tfmtodit.1.man
1 .TH tfmtodit @MAN1EXT@ "@MDATE@" "groff @VERSION@"
2 .SH Name
3 tfmtodit \- adapt TeX Font Metrics files for use with
4 .I groff
5 and
6 .I grodvi
7 .
8 .
9 .\" ====================================================================
10 .\" Legal Terms
11 .\" ====================================================================
12 .\"
13 .\" Copyright (C) 1989-2020 Free Software Foundation, Inc.
14 .\"
15 .\" Permission is granted to make and distribute verbatim copies of this
16 .\" manual provided the copyright notice and this permission notice are
17 .\" preserved on all copies.
18 .\"
19 .\" Permission is granted to copy and distribute modified versions of
20 .\" this manual under the conditions for verbatim copying, provided that
21 .\" the entire resulting derived work is distributed under the terms of
22 .\" a permission notice identical to this one.
23 .\"
24 .\" Permission is granted to copy and distribute translations of this
25 .\" manual into another language, under the above conditions for
26 .\" modified versions, except that this permission notice may be
27 .\" included in translations approved by the Free Software Foundation
28 .\" instead of in the original English.
29 .
30 .
31 .\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
32 .do nr *groff_tfmtodit_1_man_C \n[.cp]
33 .cp 0
34 .
35 .\" Define fallback for groff 1.23's MR macro if the system lacks it.
36 .nr do-fallback 0
37 .if !\n(.f           .nr do-fallback 1 \" mandoc
38 .if  \n(.g .if !d MR .nr do-fallback 1 \" older groff
39 .if !\n(.g           .nr do-fallback 1 \" non-groff *roff
40 .if \n[do-fallback]  \{\
41 .  de MR
42 .    ie \\n(.$=1 \
43 .      I \%\\$1
44 .    el \
45 .      IR \%\\$1 (\\$2)\\$3
46 .  .
47 .\}
48 .rr do-fallback
49 .
50 .
51 .\" ====================================================================
52 .\" Definitions
53 .\" ====================================================================
54 .
55 .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
56 .el .ds tx TeX
57 .
58 .
59 .\" ====================================================================
60 .SH Synopsis
61 .\" ====================================================================
62 .
63 .SY tfmtodit
64 .RB [ \-s ]
65 .RB [ \-g\~\c
66 .IR gf-file ]
67 .RB [ \-k\~\c
68 .IR skew-char ]
69 .I tfm-file
70 .I map-file
71 .I font-description
72 .YS
73 .
74 .
75 .SY tfmtodit
76 .B \-\-help
77 .YS
78 .
79 .
80 .SY tfmtodit
81 .B \-v
82 .
83 .SY tfmtodit
84 .B \-\-version
85 .YS
86 .
87 .
88 .\" ====================================================================
89 .SH Description
90 .\" ====================================================================
91 .
92 .I tfmtodit
93 creates a font description file for use with
94 .MR groff @MAN1EXT@ 's
95 .B dvi
96 output device.
97 .
98 .I tfm-file
99 is the name of the \*(tx font metric file for the font.
100 .
101 .I map-file
102 assigns
103 .I groff
104 ordinary or special character identifiers to glyph indices in the font;
105 it should consist of a sequence of lines of the form
106 .
107 .RS
108 .IR "i c1" \~\&.\|.\|.\&\~ cn
109 .RE
110 .
111 where
112 .I i
113 is a position of the glyph in the font in decimal,
114 and
115 .I c1
116 through
117 .I cn
118 are glyph identifiers in the form used by
119 .I groff
120 font descriptions.
121 .
122 If a glyph has no
123 .I groff
124 names but exists in
125 .I tfm-file,
126 it is put in the
127 .I groff
128 font description file as an unnamed glyph.
129 .
130 Output is written in
131 .MR groff_font @MAN5EXT@
132 format to
133 .I font-description,
134 a file named for the intended
135 .I groff
136 font name.
137 .
138 .
139 .P
140 If the font is \[lq]special\[rq],
141 meaning that
142 .I groff
143 should search it whenever a glyph is not found in the current font,
144 use the
145 .B \-s
146 option and name
147 .I font-description
148 in the
149 .B fonts
150 directive in the output device's
151 .I DESC
152 file.
153 .
154 .
155 .P
156 To do a good job of math typesetting,
157 .I groff
158 requires font metric information not present in
159 .I tfm-file.
160 .
161 This is because \*(tx has separate math italic fonts,
162 whereas
163 .I groff
164 uses normal italic fonts for math.
165 .
166 The additional information required by
167 .I groff
168 is given by the two arguments to the
169 .B math_fit
170 macro in the Metafont programs for the Computer Modern fonts.
171 .
172 In a text font (a font for which
173 .B math_fit
174 is false),
175 Metafont normally ignores these two arguments.
176 .
177 Metafont can be made to put this information into the GF
178 (\[lq]generic font\[rq])
179 files it produces by loading the following definition after
180 .B cmbase
181 when creating
182 .IR cm.base .
183 .
184 .RS
185 .EX
186 def ignore_math_fit(expr left_adjustment,right_adjustment) =
187     special "adjustment";
188     numspecial left_adjustment*16/designsize;
189     numspecial right_adjustment*16/designsize;
190     enddef;
191 .EE
192 .RE
193 .
194 For the EC font family,
195 load the following definition after
196 .BR exbase ;
197 consider patching
198 .I exbase.mf
199 locally.
200 .
201 .RS
202 .EX
203 def ignore_math_fit(expr left_adjustment,right_adjustment) =
204     ori_special "adjustment";
205     ori_numspecial left_adjustment*16/designsize;
206     ori_numspecial right_adjustment*16/designsize;
207     enddef;
208 .EE
209 .RE
210 .
211 The only difference from the previous example is the \[lq]ori_\[rq]
212 prefix to \[lq]special\[rq] and \[lq]numspecial\[rq].
213 .
214 The GF file created using this modified
215 .I cm.base
216 or
217 .I exbase.mf
218 should be specified with the
219 .B \-g
220 option,
221 which should
222 .I not
223 be given for a font for which
224 .B math_fit
225 is true.
226 .
227 .
228 .\" ====================================================================
229 .SH Options
230 .\" ====================================================================
231 .
232 .B \-\-help
233 displays a usage message,
234 while
235 .B \-v
236 and
237 .B \-\-version
238 show version information;
239 all exit afterward.
240 .
241 .
242 .TP
243 .BI \-g \~gf-file
244 Use the
245 .I gf-file
246 produced by Metafont containing
247 .RB \[lq] special \[rq]
248 and
249 .RB \[lq] numspecial \[rq]
250 commands to obtain additional font metric information.
251 .
252 .
253 .TP
254 .BI \-k \~skew-char
255 The skew character of this font is at position
256 .I skew-char.
257 .
258 .I skew-char
259 should be an integer;
260 it may be given in decimal,
261 with a leading 0 in octal,
262 or with a leading 0x in hexadecimal.
263 .
264 Any kerns whose second component is
265 .I skew-char
266 are ignored.
267 .
268 .
269 .TP
270 .B \-s
271 Add the
272 .B special
273 directive to the font description file.
274 .
275 .
276 .\" ====================================================================
277 .SH Files
278 .\" ====================================================================
279 .
280 .TP
281 .I @FONTDIR@/\:\%devdvi/\:DESC
282 describes the
283 .B dvi
284 output device.
285 .
286 .
287 .TP
288 .IR @FONTDIR@/\:\%devdvi/ F
289 describes the font known
290 .RI as\~ F
291 on device
292 .BR dvi .
293 .
294 .
295 .TP
296 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%ec.map
297 .TQ
298 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%msam.map
299 .TQ
300 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%msbm.map
301 .TQ
302 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%tc.map
303 .TQ
304 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%texb.map
305 .TQ
306 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%texex.map
307 .TQ
308 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%texi.map
309 .TQ
310 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%texitt.map
311 .TQ
312 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%texmi.map
313 .TQ
314 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%texr.map
315 .TQ
316 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%texsy.map
317 .TQ
318 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%textex.map
319 .TQ
320 .I @FONTDIR@/\:\%devdvi/\:\%generate/\:\%textt.map
321 map glyph indices in \*[tx] fonts to
322 .I groff
323 ordinary and special character identifiers.
324 .
325 .I \%ec.map
326 is used for
327 .BR TREC ,
328 .BR TIEC ,
329 .BR TBEC ,
330 .BR TBIEC ,
331 .BR HREC ,
332 .BR HIEC ,
333 .BR HBEC ,
334 .BR HBIEC ,
335 .BR CWEC ,
336 and
337 .BR CWIEC ;
338 .I \%msam.map
339 for
340 .BR SA ;
341 .I \%msbm.map
342 for
343 .BR SB ;
344 .I \%tc.map
345 for
346 .BR TRTC ,
347 .BR TITC ,
348 .BR TBTC ,
349 .BR TBITC ,
350 .BR HRTC ,
351 .BR HITC ,
352 .BR HBTC ,
353 .BR HBITC ,
354 .BR CWTC ,
355 and
356 .BR CWITC ;
357 .I \%texb.map
358 for
359 .BR TB ,
360 .BR HR ,
361 .BR HI ,
362 .BR HB ,
363 and
364 .BR HBI ;
365 .I \%texex.map
366 for
367 .BR EX ;
368 .I \%texi.map
369 for
370 .B TI
371 and
372 .BR TBI ;
373 .I \%texitt.map
374 for
375 .BR CWI ;
376 .I \%texmi.map
377 for
378 .BR MI ;
379 .I \%texr.map
380 for
381 .BR TR ;
382 .I \%texsy.map
383 for
384 .BR S ;
385 .I \%textex.map
386 for
387 .BR SC ;
388 and
389 .I \%textt.map
390 for
391 .BR CW .
392 .
393 .
394 .\" ====================================================================
395 .SH "See also"
396 .\" ====================================================================
397 .
398 .MR groff @MAN1EXT@ ,
399 .MR grodvi @MAN1EXT@ ,
400 .MR groff_font @MAN5EXT@
401 .
402 .
403 .\" Clean up.
404 .rm tx
405 .
406 .\" Restore compatibility mode (for, e.g., Solaris 10/11).
407 .cp \n[*groff_tfmtodit_1_man_C]
408 .do rr *groff_tfmtodit_1_man_C
409 .
410 .
411 .\" Local Variables:
412 .\" fill-column: 72
413 .\" mode: nroff
414 .\" End:
415 .\" vim: set filetype=groff textwidth=72: