# afmtodit

## Name



           afmtodit - adapt Adobe Font Metrics files for _groff_ PostScript and
           PDF output
    


## Synopsis



           **afmtodit**[**-ckmnqsx**] [**-a** _slant_] [**-d** _device-description-file_]
                    [**-e** _encoding-file_] [**-f** _internal-name_] [**-i** _italic-_
                    _correction-factor_] [**-o** _output-file_] [**-w** _space-width_] _afm-_
                    _file map-file font-description-file_
    
           **afmtodit --help**
    
           **afmtodit -v**
    
           **afmtodit --version**
    


## Description



           _afmtodit_ generates a font description file for use with _groff_(1)'s
           **ps** and **pdf** output devices from an Adobe Font Metric file, _afm-_
           _file_.  _map-file_ associates a _groff_ ordinary or special character
           name with a PostScript glyph name.  Output is written in
           _groff_font_(5) format to _font-description-file,_ a file named for
           the intended _groff_ font name (but see the **-o** option).
    
           _map-file_ should contain a sequence of lines of the form
                  _ps-glyph groff-char_
           where _ps-glyph_ is the PostScript glyph name and _groff-char_ is a
           _groff_ ordinary (if of unit length) or special (if longer)
           character identifier.  The same _ps-glyph_ can occur multiple times
           in the file; each _groff-char_ must occur at most once.  Lines
           starting with “#” and blank lines are ignored.  If the file isn't
           found in the current directory, it is sought in the _devps/generate_
           subdirectory of the default font directory.
    
           If a PostScript glyph is not mentioned in _map-file_ , and a _groff_
           character name can't be deduced using the Adobe Glyph List (AGL,
           built into _afmtodit_), then _afmtodit_ puts the PostScript glyph into
           the _groff_ font description file as an unnamed glyph which can only
           be accessed by the “\N” escape sequence in a _roff_ document.  In
           particular, this is true for glyph variants named in the form
           “ _foo_._bar_ ”; all glyph names containing one or more periods are
           mapped to unnamed entities.  Unless **-e** is specified, the encoding
           defined in the AFM file (i.e., entries with non-negative codes) is
           used.  Refer to section “Using Symbols” in _Groff: The GNU_
           _Implementation of troff_ , the _groff_ Texinfo manual, or
           _groff_char_(7), which describe how _groff_ character identifiers are
           constructed.
    
           Glyphs not encoded in the AFM file (i.e., entries indexed as “-1”)
           are still available in _groff_ ; they get glyph index values greater
           than 255 (or greater than the biggest code used in the AFM file in
           the unlikely case that it is greater than 255) in the _groff_ font
           description file.  Unencoded glyph indices don't have a specific
           order; it is best to access them only via special character
           identifiers.
    
           If the font file proper (not just its metrics) is available,
           listing it in the files _/usr/local/share/groff/1.23.0/font/devps/_
           _download_ and _/usr/local/share/groff/1.23.0/font/devpdf/download_
           enables it to be embedded in the output produced by _grops_(1) and
           _gropdf_(1), respectively.
    
           If the **-i** option is used, _afmtodit_ automatically generates an
           italic correction, a left italic correction, and a subscript
           correction for each glyph (the significance of these is explained
           in _groff_font_(5)); they can be specified for individual glyphs by
           adding to the _afm-file_ lines of the form:
                  italicCorrection _ps-glyph n_
                  leftItalicCorrection _ps-glyph n_
                  subscriptCorrection _ps-glyph n_
           where _ps-glyph_ is the PostScript glyph name, and _n_ is the desired
           value of the corresponding parameter in thousandths of an em.
           Such parameters are normally needed only for italic (or oblique)
           fonts.
    
           The **-s** option should be given if the font is “special”, meaning
           that _groff_ should search it whenever a glyph is not found in the
           current font.  To enable this search, _font-description-file_ can be
           listed as an argument to the **fonts** directive in the output
           device's _DESC_ file; alternatively, a document can designate it
           with the **special** request.  If the font is not special, there is no
           need to do either, since _troff_(1) will automatically mount it when
           it is first used.
    


## Options



           **--help** displays a usage message, while **-v** and **--version** show
           version information; all exit afterward.
    
           **-a** _slant_
                  Use _slant_ as the slant (“angle”) parameter in the font
                  description file; this is used by _groff_ in the positioning
                  of accents.  By default _afmtodit_ uses the negative of the
                  **ItalicAngle** specified in the AFM file; with true italic
                  fonts it is sometimes desirable to use a slant that is less
                  than this.  If you find that an italic font places accents
                  over base glyphs too far to the right, use **-a** to give it a
                  smaller slant.
    
           **-c** Include comments in the font description file identifying
                  the PostScript font.
    
           **-d** _device-description-file_
                  The device description file is _desc-file_ rather than the
                  default _DESC_.  If not found in the current directory, the
                  _devps_ subdirectory of the default font directory is
                  searched (this is true for both the default device
                  description file and a file given with option **-d**).
    
           **-e** _encoding-file_
                  The PostScript font should be reencoded to use the encoding
                  described in _enc-file_.  The format of _enc-file_ is described
                  in _grops_(1).  If not found in the current directory, the
                  _devps_ subdirectory of the default font directory is
                  searched.
    
           **-f** _internal-name_
                  The internal name of the _groff_ font is set to _name_.
    
           **-i** _italic-correction-factor_
                  Generate an italic correction for each glyph so that its
                  width plus its italic correction is equal to _italic-_
                  _correction-factor_ thousandths of an em plus the amount by
                  which the right edge of the glyph's bounding box is to the
                  right of its origin.  If this would result in a negative
                  italic correction, 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 x-height of the font.  If this would result in a
                  subscript correction greater than the italic correction,
                  use a subscript correction equal to the italic correction
                  instead.
    
                  Also generate a left italic correction for each glyph equal
                  to _italic-correction-factor_ thousandths of an em plus the
                  amount by which the left edge of the glyph's bounding box
                  is to the left of its origin.  The left italic correction
                  may be negative unless option **-m** is given.
    
                  This option is normally needed only with italic (or
                  oblique) fonts.  The font description files distributed
                  with _groff_ were created using an option of **-i50** for italic
                  fonts.
    
           **-o** _output-file_
                  Write to _output-file_ instead of _font-description-file._
    
           **-k** Omit any kerning data from the _groff_ font; use only for
                  monospaced (constant-width) fonts.
    
           **-m** Prevent negative left italic correction values.  Font
                  description files for roman styles distributed with _groff_
                  were created with “**-i0 -m** ” to improve spacing with _eqn_(1).
    
           **-n** Don't output a **ligatures** command for this font; use with
                  monospaced (constant-width) fonts.
    
           **-q** Quieten duplicate mapping warnings; see section
                  “Diagnostics” below.
    
           **-s** Add the **special** directive to the font description file.
    
           **-w** _space-width_
                  Use _space-width_ as the width of inter-word spaces.
    
           **-x** Don't use the built-in Adobe Glyph List.
    


## Files



           _/usr/local/share/groff/1.23.0/font/devps/DESC_
                  describes the **ps** output device.
    
           _/usr/local/share/groff/1.23.0/font/devps/_ F
                  describes the font known as _F_ on device **ps**.
    
           _/usr/local/share/groff/1.23.0/font/devps/download_
                  lists fonts available for embedding within the PostScript
                  document (or download to the device).
    
           _/usr/local/share/groff/1.23.0/font/devps/generate/dingbats.map_
           _/usr/local/share/groff/1.23.0/font/devps/generate/_
           _dingbats-reversed.map_
           _/usr/local/share/groff/1.23.0/font/devps/generate/_
           _slanted-symbol.map_
           _/usr/local/share/groff/1.23.0/font/devps/generate/symbol.map_
           _/usr/local/share/groff/1.23.0/font/devps/generate/text.map_
                  map names in the Adobe Glyph List to _groff_ special
                  character identifiers for Zapf Dingbats (**ZD**), reversed Zapf
                  Dingbats (**ZDR**), slanted symbol (**SS**), symbol (**S**), and text
                  fonts, respectively.  These _map-file_ s produce the font
                  description files provided with _groff_ for the _grops_ output
                  driver.
    


## Diagnostics



           AGL name '_x_ ' already mapped to groff name '_y_ '; ignoring AGL name
           'uni _XXXX_ '
                  You can disregard these if they're in the form shown, where
                  the ignored AGL name contains four hexadecimal digits _XXXX_.
                  The Adobe Glyph List (AGL) has its own names for glyphs;
                  they are often different from _groff_ 's special character
                  names.  _afmtodit_ is constructing a mapping from _groff_
                  special character names to AGL names; this can be a one-to-
                  one or many-to-one mapping, but one-to-many will not work,
                  so _afmtodit_ discards the excess mappings.  For example, if
                  _x_ is **Delta** , _y_ is ***D** , and _XXXX_ is **0394** , _afmtodit_ is telling
                  you that the _groff_ font description that it is writing
                  cannot map the _groff_ special character **\[*D]** to AGL glyphs
                  **Delta** and **uni0394** at the same time.
    
                  If you get a message like this but are unhappy with which
                  mapping is ignored, a remedy is to craft an alternative
                  _map-file_ and re-run _afmtodit_ using it.
    
                  When the **-q** option is used, these messages are suppressed
                  in favor of a count of how many would have been emitted
                  were the option not present.
    


## See also



           _Groff: The GNU Implementation of troff_ , by Trent A. Fisher and
           Werner Lemberg, is the primary _groff_ manual.  Section “Using
           Symbols” may be of particular note.  You can browse it
           interactively with “info '(groff)Using Symbols'”.
    
           _groff_(1), _gropdf_(1), _grops_(1), _groff_font_(5)
    


* * *