# phpman > man > afmtodit(1)

[AFMTODIT(1)](https://www.chedong.com/phpMan.php/man/AFMTODIT/1/markdown)                            General Commands Manual                           [AFMTODIT(1)](https://www.chedong.com/phpMan.php/man/AFMTODIT/1/markdown)



## NAME
       afmtodit - create font files for use with groff -Tps and -Tpdf

## SYNOPSIS
       **afmtodit** [**-ckmnsx**] [**-a** _n_] [**-d** _desc-file_] [**-e** _enc-file_] [**-f** _internal-name_] [**-i** _n_] [**-o** _output-_
                _file_] _afm-file_ _map-file_ _font_

### afmtodit -v

## DESCRIPTION
       _afmtodit_ creates a font file for use with _groff_, _grops_, and _gropdf_.  _afmtodit_ is  written  in
       Perl; you must have Perl version 5.004 or newer installed in order to run _afmtodit_.

       _afm-file_ is the AFM (Adobe Font Metric) file for the font.

       _map-file_  is  a file that says which _groff_ character names map onto each PostScript character
       name; this file should contain a sequence of lines of the form
              _ps-char_ _groff-char_
       where _ps-char_ is the PostScript name of the character and _groff-char_ is the groff name of the
       character (as used in the _groff_ font file).  The same _ps-char_ 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 searched for in the _de__‐
       _vps/generate_ subdirectory of the default font directory.

       If a PostScript character is not mentioned in _map-file_, and a generic _groff_ glyph name  can't
       be  deduced  using  the  Adobe  Glyph List (AGL, built into _afmtodit_), then _afmtodit_ puts the
       PostScript character into the _groff_ font file as an unnamed character which can only  be  ac‐
       cessed 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.  If option **-e** is not specified, the encoding defined in the AFM
       file (i.e., entries with non-negative character codes) is used.  Refer to section “Using Sym‐
       bols”  in  _Groff:_  _The_ _GNU_ _Implementation_ _of_ _troff_, the _groff_ Texinfo manual, which describes
       how _groff_ glyph names are constructed.

       Characters not encoded in the AFM file (i.e., entries which have ‘-1’ as the character  code)
       are  still  available in _groff_; they get glyph index values greater than 255 (or greater than
       the biggest character code used in the AFM file in the unlikely case that it is greater  than
       255) in the _groff_ font file.  Glyph indices of unencoded characters don't have a specific or‐
       der; it is best to access them with glyph names only.

       The _groff_ font file will be output to a file called _font_, unless the **-o** option is used.

       If there is a downloadable font file for the font, it may be listed in the  file  _/usr/share/_
       _groff/1.22.4/font/devps/download_; see [_grops_(1)](https://www.chedong.com/phpMan.php/man/grops/1/markdown).

       If  the  **-i** option is used, _afmtodit_ will automatically generate an italic correction, a left
       italic correction and a subscript correction for each character (the  significance  of  these
       parameters  is  explained in [_groff_font_(5)](https://www.chedong.com/phpMan.php/man/grofffont/5/markdown)); these parameters may be specified for individual
       characters by adding to the _afm-file_ lines of the form:
              **italicCorrection** _ps-char_ _n_
              **leftItalicCorrection** _ps-char_ _n_
              **subscriptCorrection** _ps-char_ _n_
       where _ps-char_ is the PostScript name of the character, and _n_ is the desired value of the cor‐
       responding  parameter in thousandths of an em.  These parameters are normally needed only for
       italic (or oblique) fonts.

## OPTIONS
       Whitespace is permitted between a command-line option and its argument.

### -a
              ing 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 characters from an italic font have accents placed
              too far to the right over them, then use the **-a** option to  give  the  font  a  smaller
              slant.

### -c

### -d
              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
              The PostScript font should be reencoded to use the  encoding  described  in  _enc-file_.
              The  format  of _enc-file_ is described in [_grops_(1)](https://www.chedong.com/phpMan.php/man/grops/1/markdown).  If not found in the current direc‐
              tory, the _devps_ subdirectory of the default font directory is searched.

### -f

### -i
              the  character's  italic correction is equal to _n_ thousandths of an em plus the amount
              by which the right edge of the character's bounding box is to the right of the charac‐
              ter's 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 character equal to _n_ thousandths of an
              em plus the amount by which the left edge of the character's bounding box  is  to  the
              left of the character's origin.  The left italic correction may be negative unless op‐
              tion **-m** is given.

              This option is normally needed only with italic (or oblique) fonts.   The  font  files
              distributed with _groff_ were created using an option of **-i50** for italic fonts.

### -o
              The output file is _output-file_ instead of _font_.

### -k
              fonts.

### -m
              _groff_ were created with **-i0** **-m** to improve spacing with [_eqn_(1)](https://www.chedong.com/phpMan.php/man/eqn/1/markdown).

### -n
              fonts.

### -s
              font file.

### -v

### -x

## FILES
       _/usr/share/groff/1.22.4/font/devps/DESC_
              Device description file.

       _/usr/share/groff/1.22.4/font/devps/_F
              Font description file for font _F_.

       _/usr/share/groff/1.22.4/font/devps/download_
              List of downloadable fonts.

       _/usr/share/groff/1.22.4/font/devps/text.enc_
              Encoding used for text fonts.

       _/usr/share/groff/1.22.4/font/devps/generate/textmap_
              Standard mapping.

## 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 interac‐
       tively with “info '(groff)Using Symbols'”.

       [_groff_(1)](https://www.chedong.com/phpMan.php/man/groff/1/markdown), [_gropdf_(1)](https://www.chedong.com/phpMan.php/man/gropdf/1/markdown), [_grops_(1)](https://www.chedong.com/phpMan.php/man/grops/1/markdown), [_groff_font_(5)](https://www.chedong.com/phpMan.php/man/grofffont/5/markdown), [_perl_(1)](https://www.chedong.com/phpMan.php/man/perl/1/markdown)



groff 1.22.4                                23 March 2022                                [AFMTODIT(1)](https://www.chedong.com/phpMan.php/man/AFMTODIT/1/markdown)
