groff before CVS: release 1.05
[s-roff.git] / man / tfmtodit.man
blob68c95fe8e315b2be43ff658ae6e28e69f6477eb8
1 .\" -*- nroff -*-
2 .ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
3 .el .ds tx TeX
4 .TH TFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
5 .SH NAME
6 tfmtodit \- create font files for use with groff \-Tdvi
7 .SH SYNOPSIS
8 .B tfmtodit
10 .B \-sv
13 .BI \-g gf_file
16 .BI \-k skewchar
18 .I tfm_file
19 .I map_file
20 .I font
21 .SH DESCRIPTION
22 .B tfmtodit
23 creates a font file for use with
25 groff \-Tdvi\fR.
26 .I tfm_file
27 is the name of the \*(tx font metric file for the font.
28 .I map_file
29 is a file giving the groff names for characters in the font;
30 this file should consist of a sequence of lines of the form:
31 .IP
33 n c1 c2 \fR.\|.\|.
34 .LP
35 where
36 .I n
37 is a decimal integer giving the position of the character in the font,
38 and
39 .IR c1 ,
40 .IR c2 ,.\|.\|.
41 are the groff names of the character.
42 If a character has no groff names but exists in the tfm file,
43 then it will be put in the groff font file as an unnamed character.
44 .I font
45 is the name of the groff font file.
46 The groff font file is written to
47 .IR font .
48 .LP
49 The
50 .B \-s
51 option should be given if the font is special
52 (a font is
53 .I special
55 .B gtroff
56 should search it whenever
57 a character is not found in the current font.)
58 If the font is special,
59 it should be listed in the
60 .B fonts
61 command in the DESC file;
62 if it is not special, there is no need to list it, since
63 .B gtroff
64 can automatically mount it when it's first used.
65 .LP
66 To do a good job of math typesetting, groff requires
67 font metric information not present in the tfm file.
68 The reason for this is that \*(tx has separate math italic fonts
69 whereas groff uses normal italic fonts for math.
70 The additional information required by groff is given by the
71 two arguments to the
72 .B math_fit
73 macro in the Metafont programs for the Computer Modern fonts.
74 In a text font (a font for which
75 .B math_fitting
76 is false), Metafont normally ignores these two arguments.
77 Metafont can be made to put this information in the gf file
78 by loading the following definition after
79 .B cmbase
80 when creating
81 .BR cm.base :
82 .IP
83 .nf
84 .ft B
85 def ignore_math_fit(expr left_adjustment,right_adjustment) =
86     special "adjustment";
87     numspecial left_adjustment*16/designsize;
88     numspecial right_adjustment*16/designsize;
89     enddef;
90 .fi
91 .ft R
92 .LP
93 The gf file created using this modified
94 .B cm.base
95 should be specified with the
96 .B \-g
97 option.
98 The
99 .B \-g
100 option should not be given for a font for which
101 .B math_fitting
102 is true.
103 .SH OPTIONS
105 .B \-v
106 Print the version number.
108 .B \-s
109 The font is special.
110 The effect of this option is to add the
111 .B special
112 command to the font file.
114 .BI \-k n
115 The skewchar of this font is at position
116 .IR n .
117 .I n
118 should be an integer;
119 it may be given in decimal,
120 or with a leading 
121 .B 0
122 in octal,
123 or with a leading
124 .B 0x
125 in hexadecimal.
126 The effect of this option is to ignore any kerns whose second component
127 is the specified character.
129 .BI \-g gf_file
130 .I gf_file
131 is a gf file produced by Metafont containing special and numspecial
132 commands giving additional font metric information.
133 .SH FILES
134 .TP \w'\fB@FONTDIR@/devdvi/DESC'u+2n
135 .B @FONTDIR@/devdvi/DESC
136 Device desciption file.
138 .BI @FONTDIR@/devdvi/ F
139 Font description file for font
140 .IR F .
141 .SH "SEE ALSO"
142 .BR groff (@MAN1EXT@),
143 .BR grodvi (@MAN1EXT@),
144 .BR groff_font (@MAN5EXT@)