# tfmtodit

## Name



           tfmtodit - adapt TeX Font Metrics files for use with _groff_ and
           _grodvi_
    


## Synopsis



           **tfmtodit**[**-s**] [**-g** _gf-file_] [**-k** _skew-char_] _tfm-file map-file font-_
                    _description_
    
           **tfmtodit --help**
    
           **tfmtodit -v**
    
           **tfmtodit --version**
    


## Description



           _tfmtodit_ creates a font description file for use with _groff_(1)'s
           **dvi** output device.  _tfm-file_ is the name of the TeX font metric
           file for the font.  _map-file_ assigns _groff_ ordinary or special
           character identifiers to glyph indices in the font; it should
           consist of a sequence of lines of the form
                  _i c1_ ... _cn_
           where _i_ is a position of the glyph in the font in decimal, and _c1_
           through _cn_ are glyph identifiers in the form used by _groff_ font
           descriptions.  If a glyph has no _groff_ names but exists in _tfm-_
           _file,_ it is put in the _groff_ font description file as an unnamed
           glyph.  Output is written in _groff_font_(5) format to _font-_
           _description,_ a file named for the intended _groff_ font name.
    
           If the font is “special”, meaning that _groff_ should search it
           whenever a glyph is not found in the current font, use the **-s**
           option and name _font-description_ in the **fonts** directive in the
           output device's _DESC_ file.
    
           To do a good job of math typesetting, _groff_ requires font metric
           information not present in _tfm-file._  This is because TeX has
           separate math italic fonts, whereas _groff_ uses normal italic fonts
           for math.  The additional information required by _groff_ is given
           by the two arguments to the **math_fit** macro in the Metafont
           programs for the Computer Modern fonts.  In a text font (a font
           for which **math_fit** is false), Metafont normally ignores these two
           arguments.  Metafont can be made to put this information into the
           GF (“generic font”) files it produces by loading the following
           definition after **cmbase** when creating _cm.base_.
                  def ignore_math_fit(expr left_adjustment,right_adjustment) =
                      special "adjustment";
                      numspecial left_adjustment*16/designsize;
                      numspecial right_adjustment*16/designsize;
                      enddef;
           For the EC font family, load the following definition after
           **exbase** ; consider patching _exbase.mf_ locally.
                  def ignore_math_fit(expr left_adjustment,right_adjustment) =
                      ori_special "adjustment";
                      ori_numspecial left_adjustment*16/designsize;
                      ori_numspecial right_adjustment*16/designsize;
                      enddef;
           The only difference from the previous example is the “ori_” prefix
           to “special” and “numspecial”.  The GF file created using this
           modified _cm.base_ or _exbase.mf_ should be specified with the **-g**
           option, which should _not_ be given for a font for which **math_fit** is
           true.
    


## Options



           **--help** displays a usage message, while **-v** and **--version** show
           version information; all exit afterward.
    
           **-g** _gf-file_
                  Use the _gf-file_ produced by Metafont containing “**special** ”
                  and “**numspecial** ” commands to obtain additional font metric
                  information.
    
           **-k** _skew-char_
                  The skew character of this font is at position _skew-char._
                  _skew-char_ should be an integer; it may be given in decimal,
                  with a leading 0 in octal, or with a leading 0x in
                  hexadecimal.  Any kerns whose second component is _skew-char_
                  are ignored.
    
           **-s** Add the **special** directive to the font description file.
    


## Exit status



           _tfmtodit_ 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/devdvi/DESC_
                  describes the **dvi** output device.
    
           _/usr/local/share/groff/1.23.0/font/devdvi/_ F
                  describes the font known as _F_ on device **dvi**.
    
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/ec.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/msam.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/msbm.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/tc.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/texb.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/texex.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/texi.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/texitt.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/texmi.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/texr.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/texsy.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/textex.map_
           _/usr/local/share/groff/1.23.0/font/devdvi/generate/textt.map_
                  map glyph indices in TeX fonts to _groff_ ordinary and
                  special character identifiers.  _ec.map_ is used for **TREC** ,
                  **TIEC** , **TBEC** , **TBIEC** , **HREC** , **HIEC** , **HBEC** , **HBIEC** , **CWEC** , and
                  **CWIEC** ; _msam.map_ for **SA** ; _msbm.map_ for **SB** ; _tc.map_ for **TRTC** ,
                  **TITC** , **TBTC** , **TBITC** , **HRTC** , **HITC** , **HBTC** , **HBITC** , **CWTC** , and
                  **CWITC** ; _texb.map_ for **TB** , **HR** , **HI** , **HB** , and **HBI** ; _texex.map_ for
                  **EX** ; _texi.map_ for **TI** and **TBI** ; _texitt.map_ for **CWI** ; _texmi.map_
                  for **MI** ; _texr.map_ for **TR** ; _texsy.map_ for **S** ; _textex.map_ for
                  **SC** ; and _textt.map_ for **CW**.
    


## See also



           _groff_(1), _grodvi_(1), _groff_font_(5)
    


* * *