# hpftodit

## Name



           hpftodit - create font description files for use with _groff_ and
           _grolj4_
    


## Synopsis



           **hpftodit**[**-aqs**] [**-i** _n_] _tfm-file map-file font-description_
    
           **hpftodit -d** _tfm-file_ [_map-file_]
    
           **hpftodit --help**
    
           **hpftodit -v**
    
           **hpftodit --version**
    


## Description



           _hpftodit_ creates a font description file for use with a Hewlett-
           Packard LaserJet 4-series (or newer) printer and the _grolj4_(1)
           output driver of _groff_(1), using data from an HP tagged font
           metric (TFM) file.  _tfm-file_ is the name of the font's TFM file;
           Intellifont and TrueType TFM files are supported, but symbol set
           TFM files are not.  _map-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
           _groff_char_(7) 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–F, and must lack a leading “**0x** ”,
           “**u** ”, or “**U+** ”.  Unicode values corresponding to composite glyphs
           are decomposed; that is “**u00C0** ” becomes “**u0041_0300** ”.  A glyph
           without a _groff_ special character identifier may be named **u** _XXXX_ if
           the glyph corresponds to a Unicode value, or as an unnamed glyph
           “**---** ”.  If the given Unicode value is in the Private Use Area
           (PUA) (0xE000–0xF8FF), the glyph is included as an unnamed glyph.
           Refer to _groff_diff_(1) for additional information about unnamed
           glyphs and how to access them.
    
           Blank lines and lines beginning with “**#** ” are ignored.  A “**#** ”
           following one or more _groff_ names begins a comment.  Because “**#** ”
           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 “**#** ” is interpreted as the beginning of the comment.
    
           _hpftodit_ writes output to _font-description,_ a file named for the
           intended _groff_ font name; if this operand is “**-** ”, _hpftodit_ writes
           to the standard output stream.  The **-i** option directs _hpftodit_ to
           automatically generate an italic correction, a left italic
           correction, and a subscript correction for each glyph.  See
           _groff_font_(5).
    


## 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
                  _map-file_.  A glyph with corresponding Unicode value is
                  given the name u _XXXX_ ; a glyph without a Unicode value is
                  included as an unnamed glyph “---”.  A glyph with a Unicode
                  value in the Private Use Area (0xE000–0xF8FF) is also
                  included as an unnamed glyph.
    
                  This option provides a simple means of adding Unicode-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 “text” symbol sets are searched for matching glyphs;
                  with it, only the “mathematical” symbol sets are searched.
                  Nonetheless, restricting the symbol sets searched isn't
                  very selective—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 “DU” 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
                  _map-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, _map-file_ is optional, and _output-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.  The
                  minimum value _hpftodit_ will write is zero.
    
                  Also generate a subscript correction equal to the product
                  of the tangent of the slant of the font and four fifths of
                  the x-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 “text” sets are
                  searched before the “mathematical” symbol sets.  With it,
                  the search order is reversed.
    


## Exit status



           _hpftodit_ exits with status **0** on successful operation, status **2** if
           the program cannot interpret its command-line arguments, and
           status **1** if it encounters an error during operation.
    


## Files



           _/usr/local/share/groff/1.23.0/font/devlj4/DESC_
                  describes the **lj4** output device.
    
           _/usr/local/share/groff/1.23.0/font/devlj4/_ F
                  describes the font known as _F_ on device **lj4**.
    
           _/usr/local/share/groff/1.23.0/font/devlj4/generate/Makefile_
                  is a _make_(1) script that uses _hpftodit_(1) to prepare the
                  _groff_ font description files above from HP TFM data; it can
                  be used to regenerate them in the event the TFM files are
                  updated.
    
           _/usr/local/share/groff/1.23.0/font/devlj4/generate/special.awk_
                  is an _awk_(1) script that corrects the Intellifont-based
                  height metrics for several glyphs in the **S**(special) font
                  for TrueType CG Times used in the HP LaserJet 4000 and
                  later.
    
           _/usr/local/share/groff/1.23.0/font/devlj4/generate/special.map_
           _/usr/local/share/groff/1.23.0/font/devlj4/generate/symbol.map_
           _/usr/local/share/groff/1.23.0/font/devlj4/generate/text.map_
           _/usr/local/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



           _groff_(1), _groff_diff_(1), _grolj4_(1), _groff_font_(5)
    


* * *