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