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