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