groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / src / utils / hpftodit / hpftodit.man
1 .tr ~
2 .ig
3 Copyright (C) 1994-2000, 2001, 2003, 2004, 2009
4   Free Software Foundation, Inc.
5
6 Permission is granted to make and distribute verbatim copies of
7 this manual provided the copyright notice and this permission notice
8 are preserved on all copies.
9
10 Permission is granted to copy and distribute modified versions of this
11 manual under the conditions for verbatim copying, provided that the
12 entire resulting derived work is distributed under the terms of a
13 permission notice identical to this one.
14
15 Permission is granted to copy and distribute translations of this
16 manual into another language, under the above conditions for modified
17 versions, except that this permission notice may be included in
18 translations approved by the Free Software Foundation instead of in
19 the original English.
20 ..
21 .\" Like TP, but if specified indent is more than half
22 .\" the current line-length - indent, use the default indent.
23 .de Tp
24 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
25 .el .TP "\\$1"
26 ..
27 .de CW
28 .ie \\n(.$>2 \&\\$1\f(CR\\$2\fP\\$3
29 .el \&\f(CR\\$1\fP\\$2
30 ..
31 .tr ~
32 .TH HPFTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
33 .\" --------------------------------------------------------------------------
34 .SH NAME
35 .\" --------------------------------------------------------------------------
36 hpftodit \- create font description files for use with groff \-Tlj4
37 .\" --------------------------------------------------------------------------
38 .SH SYNOPSIS
39 .\" --------------------------------------------------------------------------
40 .B hpftodit
41 [
42 .B \-adqsv
43 ]
44 [
45 .BI \-i n
46 ]
47 .I tfm_file
48 .I map_file
49 .I font
50 .PP
51 It is possible to have whitespace between the
52 .B \-i
53 option and its parameter.
54 .\" --------------------------------------------------------------------------
55 .SH DESCRIPTION
56 .\" --------------------------------------------------------------------------
57 .B hpftodit
58 creates a font file for use with a Hewlett-Packard LaserJet~4\(enseries
59 (or newer) printer with
60 .BR "groff \-Tlj4" ,
61 using data from an HP tagged font metric (TFM) file.
62 .I tfm_file
63 is the name of the TFM file for the font; Intellifont and
64 TrueType TFM files are supported, but symbol set TFM files are not.
65 .I map_file
66 is a file giving the groff names for characters in the font; this file
67 should consist of a sequence of lines of the form:
68 .IP
69 .I
70 m u c1 c2 \fR.\|.\|. [ 
71 .CW #
72 .I comment
73 ]
74 .LP
75 where
76 .I m
77 is a decimal integer giving the MSL number of the character,
78 .I u
79 is a hexadecimal integer giving the Unicode value of the character,
80 and
81 .IR c1 ,
82 .IR c2 ", .\|.\|."
83 are the groff names of the character.
84 The values can be separated by any whitespace; the Unicode value must
85 use uppercase digits A\^\(en\^F, and must be without a leading
86 .CW ` 0x ',
87 .CW ` u ',
88 or
89 .CW ` U+ '.
90 Unicode values corresponding to composite glyphs are decomposed; e.g.,
91 .CW ` u00C0 '
92 becomes
93 .CW ` u0041_0300 '.
94 The name for a glyph without a groff name may be given as
95 .CW u \fIXXXX\fP
96 if the glyph corresponds to a Unicode value, or as an unnamed glyph
97 .CW ` --- '.
98 If the given Unicode value is in the Private Use Area
99 (0xE000\^\(en\^0xF8FF), the glyph is included as an unnamed glyph.
100 Refer to
101 .BR groff_diff (@MAN1EXT@)
102 for additional information about unnamed glyphs and how to access them.
103 .LP
104 Blank lines and lines beginning with
105 .CW ` # '
106 are ignored.
107 A
108 .CW ` # '
109 following one or more groff names begins a comment.
110 Because
111 .CW ` # '
112 is a valid groff name, it must appear first in a list of
113 groff names if a comment is included, e.g.,
114 .IP
115 .CW "3   0023   #   # number sign"
116 .LP
117 or
118 .IP
119 .CW "3   0023   # sh   # number sign"
120 .LP
121 rather than
122 .IP
123 .CW "3   0023   sh #   # number sign"
124 .LP
125 which will treat the first
126 .CW ` # '
127 as the beginning of the comment.
128 .LP
129 .I font
130 is the name of the groff font file.
131 The groff font file is written to
132 .IR font ;
133 if
134 .I font
135 is specified as
136 .CW ` - ',
137 the output is written to the standard output.
138 .LP
139 The
140 .B \-s
141 option should be given if the font is special
142 (a font is
143 .I special
144 if
145 .B troff
146 should search it whenever
147 a character is not found in the current font).
148 If the font is special,
149 it should be listed in the
150 .B fonts
151 command in the DESC file;
152 if it is not special, there is no need to list it, since
153 .B troff
154 can automatically mount it when it's first used.
155 .LP
156 If the
157 .B \-i
158 option is used,
159 .B hpftodit
160 automatically will generate an italic correction,
161 a left italic correction and a subscript correction
162 for each character
163 (the significance of these parameters is explained in
164 .BR groff_font (@MAN5EXT@)).
165 .\" --------------------------------------------------------------------------
166 .SH OPTIONS
167 .\" --------------------------------------------------------------------------
168 .TP
169 .B \-a
170 Include characters in the TFM file that are not included in the map
171 file.
172 A glyph with corresponding Unicode value is given the name
173 .RI u XXXX ;
174 a glyph without a Unicode value is included as an unnamed glyph
175 \&`\-\^\-\^\-'.
176 A glyph with a Unicode value in the Private Use Area
177 (0xE000\^\(en\^0xF8FF) also is included as an unnamed glyph.
178 .IP
179 This option provides a simple means of adding Unicode-named and unnamed
180 glyphs to a font without including them in the map file, but it affords
181 little control over which glyphs are placed in a regular font and which
182 are placed in a special font.
183 The presence or absence of the
184 .B \-s
185 option has some effect on which glyphs are included: without the
186 .B \-s
187 option, only the \(lqtext\(rq symbol sets are searched for matching
188 glyphs; with the
189 .B \-s
190 option, only the \(lqmathematical\(rq symbol sets
191 are searched.
192 Nonetheless, restricting the symbol sets searched isn't very
193 selective\(emmany glyphs are placed in both regular and special fonts.
194 Normally, the
195 .B \-a
196 option should be used only as a last resort.
197 .\" --------------------------------------------------------------------------
198 .TP
199 .B \-d
200 Dump information about the TFM file to the standard output; this option
201 can be useful for ensuring that a TFM file is a proper match for a font,
202 and that the contents of the TFM file are suitable.
203 The information includes the values of important TFM tags, and a listing
204 (by MSL number for Intellifont TFM files or by Unicode value for
205 TrueType TFM files) of the glyphs included in the TFM file.
206 The unit of measure `DU' for some tags indicates design units; there are
207 8782 design units per em for Intellifont fonts, and 2048 design units
208 per em for TrueType fonts.
209 Note that the accessibility of a glyph depends on its inclusion in a
210 symbol set; some TFM files list many glyphs but only a few symbol sets.
211 .IP
212 The glyph listing includes the glyph index within the TFM file, the MSL
213 or Unicode value, and the symbol set and character code that will be
214 used to print the glyph.
215 If
216 .I map_file
217 is given,
218 groff names are given for matching glyphs.
219 If only the glyph index and MSL or Unicode value are given, the glyph
220 does not appear in any supported symbol set and cannot be printed.
221 .IP
222 With the
223 .B \-d
224 option,
225 .I map_file
226 is optional, and
227 .I font
228 is ignored if given.
229 .\" --------------------------------------------------------------------------
230 .TP
231 .B \-q
232 Suppress warnings about characters in the map file that were not found
233 in the TFM file.
234 Warnings never are given for unnamed glyphs or by glyphs named by their
235 Unicode values.
236 This option is useful when sending the output of
237 .B hpftodit
238 to the standard output.
239 .\" --------------------------------------------------------------------------
240 .TP
241 .B \-v
242 Print the
243 .B hpftodit
244 version number.
245 .\" --------------------------------------------------------------------------
246 .TP
247 .B \-s
248 The font is special.
249 This option adds the
250 .B special
251 command to the font file, and affects the order in which HP symbol sets
252 are searched for each glyph.
253 Without the
254 .B \-s
255 option, the \(lqtext\(rq sets are searched before
256 the \(lqmathematical\(rq symbol sets.
257 With the
258 .B \-s
259 option, the search order is reversed.
260 .\" --------------------------------------------------------------------------
261 .TP
262 .BI \-i n
263 Generate an italic correction for each character so that the character's
264 width plus the character's italic correction is equal to
265 .I n
266 thousandths of an em plus the amount by which the right edge of the
267 character's bounding is to the right of the character's origin.
268 If this would result in a negative italic correction, use a zero italic
269 correction instead.
270 .IP
271 Also generate a subscript correction equal to the 
272 product of the tangent of the slant of the font and
273 four fifths of the x-height of the font.
274 If this would result in a subscript correction greater than the italic
275 correction, use a subscript correction equal to the italic correction
276 instead.
277 .IP
278 Also generate a left italic correction for each character
279 equal to
280 .I n
281 thousandths of an em plus the amount by which the left edge of the
282 character's bounding box is to the left of the character's origin.
283 The left italic correction may be negative.
284 .IP
285 This option normally is needed only with italic or oblique fonts;
286 a value of 50 (0.05 em) usually is a reasonable choice.
287 .\" --------------------------------------------------------------------------
288 .SH FILES
289 .\" --------------------------------------------------------------------------
290 .ad 0
291 .TP \w'\fB@FONTDIR@/devlj4/generate/\fP\fI*\fP.map'u+2n
292 .B @FONTDIR@/devlj4/DESC
293 Device description file.
294 .TP
295 .BI @FONTDIR@/devlj4/ F
296 Font description file for font
297 .IR F .
298 .TP
299 .BI @FONTDIR@/devlj4/generate/ * .map
300 Symbol mapping files
301 .\" --------------------------------------------------------------------------
302 .SH "SEE ALSO"
303 .\" --------------------------------------------------------------------------
304 .BR groff (@MAN1EXT@),
305 .BR groff_diff (@MAN1EXT@),
306 .BR grolj4 (@MAN1EXT@),
307 .BR groff_font (@MAN5EXT@),
308 .BR lj4_font (@MAN5EXT@)
309 .
310 .\" Local Variables:
311 .\" mode: nroff
312 .\" End: