hpftodit
Section: User Commands (1)
Updated: 2 July 2023
Index
Return to Main Contents
Name
hpftodit - create font description files for use with
groff
and
grolj4
.nr d-fallback 1
.nr d-fallback 1
Synopsis
[
-aqs]
[
-i~n]
tf-file
ma-file
fon-description
-d
tf-file
[
ma-file]
--help
-v
--version
Description
hpftodit
creates a font description file for use with a Hewlet-Packard
LaserJet~-series
(or newer)
printer with the
output driver of
using data from an HP tagged font metric (TFM) file.
tf-file
is the name of the font's TFM file;
Intellifont and TrueType TFM files are supported,
but symbol set TFM files are not.
ma-file
is a file giving the
groff
special character identifiers for glyphs in the font;
this file should consist of a sequence of lines of the form
-
m u c1 c2 ... [# comment]
where
m
is a decimal integer giving the glyph's MSL
(Master Symbol List)
number,
u
is a hexadecimal integer giving its Unicode character code,
and
c1,
c2, ...
are its
groff
glyph names
(see
for a list).
The values can be separated by any number of spaces and/or tabs.
The Unicode value must use uppercase hexadecimal digits A[en]F,
and must lack a leading
[lq]
0x[rq],
[lq]
u[rq],
or
[lq]
U+[rq].
Unicode values corresponding to composite glyphs are decomposed;
that is
[lq]
u00C0[rq]
becomes
[lq]
u0041_0300[rq].
A glyph without a
groff
special character identifier may be named
uXXXX
if the glyph corresponds to a Unicode value,
or as an unnamed glyph
[lq]
---[rq].
If the given Unicode value is in the Private Use Area (PUA)
(0xE000[en]0xF8FF),
the glyph is included as an unnamed glyph.
Refer to
for additional information about unnamed glyphs and how to access them.
Blank lines and lines beginning with
[lq]
#[rq]
are ignored.
A
[lq]
#[rq]
following one or more
groff
names begins a comment.
Because
[lq]
#[rq]
is a valid
groff
name,
it must appear first in a list of
groff
names if a comment is included,
as in
-
3 0023 # # number sign
or
-
3 0023 # sh # number sign
whereas in
-
3 0023 sh # # number sign
the first
[lq]
#[rq]
is interpreted as the beginning of the comment.
Output is written in
format to
fon-description,
a file named for the intended
groff
font name;
if this operand is
[lq]
-[rq],
the font description is written to the standard output stream.
If the
-i
option is used,
hpftodit
automatically will generate an italic correction,
a left italic correction,
and a subscript correction for each glyph
(the significance of these parameters is explained in
Options
--help
displays a usage message,
while
-v
and
--version
show version information;
all exit afterward.
- -a
-
Include glyphs in the TFM file that are not included in
ma-file.
A glyph with corresponding Unicode value is given the name
uXXXX;
a glyph without a Unicode value is included as an unnamed glyph
[lq]---[rq].
A glyph with a Unicode value in the Private Use Area
(0xE000[en]0xF8FF)
is also included as an unnamed glyph.
-
This option provides a simple means of adding Unicod-named and
unnamed glyphs to a font without including them in the map file,
but it affords little control over which glyphs are placed in a regular
font and which are placed in a special font.
The presence or absence of the
-s
option has some effect on which glyphs are included:
without it,
only the [lq]text[rq] symbol sets are searched for matching glyphs;
with it,
only the [lq]mathematical[rq] symbol sets are searched.
Nonetheless,
restricting the symbol sets searched isn't very selective[em]many
glyphs are placed in both regular and special fonts.
Normally,
-a
should be used only as a last resort.
- -d
-
Dump information about the TFM file to the standard output stream;
use this to ensure that a TFM file is a proper match for a font,
and that its contents are suitable.
The information includes the values of important TFM tags and a listing
(by MSL number for Intellifont TFM files or by Unicode value for
TrueType TFM files)
of the glyphs included in the TFM file.
The unit of measure [lq]DU[rq] for some tags indicates design units;
there are 8782~design units per em for Intellifont fonts,
and 2048~design units per em for TrueType fonts.
Note that the accessibility of a glyph depends on its inclusion in a
symbol set;
some TFM files list many glyphs but only a few symbol sets.
-
The glyph listing includes the glyph index within the TFM file,
the MSL or Unicode value,
and the symbol set and character code that will be used to print the
glyph.
If
ma-file
is given,
groff
names are given for matching glyphs.
If only the glyph index and MSL or Unicode value are given,
the glyph does not appear in any supported symbol set and cannot be
printed.
-
With the
-d
option,
ma-file
is optional,
and
outpu-font
is ignored if given.
- -i~n
-
Generate an italic correction for each glyph so that its width plus its
italic correction is equal to
n
thousandths of an em plus the amount by which the right edge of the
glyphs's bounding box is to the right of its origin.
If a negative italic correction would result,
use a zero italic correction instead.
-
Also generate a subscript correction equal to the product of the tangent
of the slant of the font and four fifths of the -height of the font.
If a subscript correction greater than the italic correction would
result,
use a subscript correction equal to the italic correction instead.
-
Also generate a left italic correction for each glyph equal to
n
thousandths of an em plus the amount by which the left edge of the
glyphs's bounding box is to the left of its origin.
The left italic correction may be negative.
-
This option normally is needed only with italic or oblique fonts;
a value of 50
(0.05~em)
usually is a reasonable choice.
- -q
-
Suppress warnings about glyphs in the map file that were not found in
the TFM file.
Warnings never are given for unnamed glyphs or by glyphs named by their
Unicode values.
This option is useful when sending the output of
hpftodit
to the standard output stream.
- -s
-
Add the
special
directive to the font description file,
affecting the order in which HP symbol sets are searched for each glyph.
Without this option,
the [lq]text[rq] sets are searched before the [lq]mathematical[rq]
symbol sets.
With it,
the search order is reversed.
Files
- /usr/:share/:groff/:1.23.0/:font/:devlj4/:DESC
-
describes the
lj4
output device.
- /usr/:share/:groff/:1.23.0/:font/:devlj4/F
-
describes the font known
as~F
on device
lj4.
- /usr/:share/:groff/:1.23.0/:font/:devlj4/:generate/:Makefile
-
is a
script that uses
to prepare the
groff
font description files above from HP TFM data;
in can be used to regenerate them in the event the TFM files are
updated.
- /usr/:share/:groff/:1.23.0/:font/:devlj4/:generate/:special:.awk
-
is an
script that corrects the Intellifon-based height metrics for several
glyphs in the
S
(special) font for TrueType CG Times used in the HP LaserJet~4000 and
later.
- /usr/:share/:groff/:1.23.0/:font/:devlj4/:generate/:special:.map
-
/usr/:share/:groff/:1.23.0/:font/:devlj4/:generate/:symbol:.map
/usr/:share/:groff/:1.23.0/:font/:devlj4/:generate/:text:.map
/usr/:share/:groff/:1.23.0/:font/:devlj4/:generate/:wingdings.map
map MSL indices and HP Unicode PUA assignments to
groff
special character identifiers.
See also
Index
- Name
-
- Synopsis
-
- Description
-
- Options
-
- Files
-
- See also
-