{
    "mode": "info",
    "parameter": "TFMTODIT",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/TFMTODIT/json",
    "generated": "2026-07-05T13:01:41Z",
    "synopsis": "tfmtodit [-s] [-g gffile] [-k skewchar] tfmfile mapfile font\ntfmtodit --help\ntfmtodit -v\ntfmtodit --version",
    "sections": {
        "NAME": {
            "content": "tfmtodit - create font files for use with groff -Tdvi\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "tfmtodit [-s] [-g gffile] [-k skewchar] tfmfile mapfile font\n\ntfmtodit --help\n\ntfmtodit -v\ntfmtodit --version\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "tfmtodit creates a font file for use with groff -Tdvi.  tfmfile is the\nname of the TeX font metric file for the font.  mapfile is a file giv-\ning  the  groff names for characters in the font; this file should con-\nsist of a sequence of lines of the form:\n\nn c1 c2 ...\n\nwhere n is a decimal integer giving the position of  the  character  in\nthe  font,  and c1, c2,...  are the groff names of the character.  If a\ncharacter has no groff names but exists in the tfm file, then  it  will\nbe  put  in  the  groff font file as an unnamed character.  font is the\nname of the groff font file.  The groff font file is written to font.\n\nThe -s option should be given if the font is special (a font is special\nif troff should search it whenever a character is not found in the cur-\nrent font.)  If the font is special, it should be listed in  the  fonts\ncommand  in  the  DESC  file; if it is not special, there is no need to\nlist it, since troff can automatically mount it when it's first used.\n\nTo do a good job of math typesetting, groff requires font metric infor-\nmation  not  present  in the tfm file.  The reason for this is that TeX\nhas separate math italic fonts whereas groff uses normal  italic  fonts\nfor math.  The additional information required by groff is given by the\ntwo arguments to the mathfit macro in the Metafont  programs  for  the\nComputer  Modern  fonts.  In a text font (a font for which mathfitting\nis false), Metafont normally ignores these two arguments.  Metafont can\nbe made to put this information in the gf file by loading the following\ndefinition after cmbase when creating cm.base:\n\ndef ignoremathfit(expr leftadjustment,rightadjustment) =\nspecial \"adjustment\";\nnumspecial leftadjustment*16/designsize;\nnumspecial rightadjustment*16/designsize;\nenddef;\n\nFor the EC font family, load the following definition after exbase  (it\nis probably easiest to patch exbase.mf locally):\n\ndef ignoremathfit(expr leftadjustment,rightadjustment) =\norispecial \"adjustment\";\norinumspecial leftadjustment*16/designsize;\norinumspecial rightadjustment*16/designsize;\nenddef;\n\nThe  gf  file  created  using this modified cm.base or exbase should be\nspecified with the -g option.  The -g option should not be given for  a\nfont for which mathfitting is true.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Whitespace is permitted between a command-line option and its argument.\n\n-v     Print the version number.\n\n-s     The  font  is  special.  The effect of this option is to add the\nspecial command to the font file.\n\n-kn    The skewchar of this font is at position n.  n should be an  in-\nteger; it may be given in decimal, or with a leading 0 in octal,\nor with a leading 0x in hexadecimal.  The effect of this  option\nis  to  ignore any kerns whose second component is the specified\ncharacter.\n",
            "subsections": [
                {
                    "name": "-ggf_file",
                    "content": "gffile is a gf file produced by Metafont containing special and\nnumspecial commands giving additional font metric information.\n"
                }
            ]
        },
        "FILES": {
            "content": "/usr/share/groff/1.22.4/font/devdvi/DESC\nDevice description file.\n\n/usr/share/groff/1.22.4/font/devdvi/F\nFont description file for font F.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "groff(1), grodvi(1), grofffont(5)\n\ngroff 1.22.4                     23 March 2022                     TFMTODIT(1)",
            "subsections": []
        }
    },
    "summary": "tfmtodit - create font files for use with groff -Tdvi",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "gffile is a gf file produced by Metafont containing special and numspecial commands giving additional font metric information."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "groff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/groff/1/json"
        },
        {
            "name": "grodvi",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grodvi/1/json"
        },
        {
            "name": "grofffont",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/grofffont/5/json"
        }
    ]
}