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