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