{
    "mode": "man",
    "parameter": "afmtodit",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/afmtodit/1/json",
    "generated": "2026-06-10T16:17:47Z",
    "synopsis": "afmtodit [-ckmnsx] [-a n] [-d desc-file] [-e enc-file] [-f internal-name] [-i n] [-o output-\nfile] afm-file map-file font",
    "sections": {
        "NAME": {
            "content": "afmtodit - create font files for use with groff -Tps and -Tpdf\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "afmtodit [-ckmnsx] [-a n] [-d desc-file] [-e enc-file] [-f internal-name] [-i n] [-o output-\nfile] afm-file map-file font\n",
            "subsections": [
                {
                    "name": "afmtodit -v",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "afmtodit creates a font file for use with groff, grops, and gropdf.  afmtodit is  written  in\nPerl; you must have Perl version 5.004 or newer installed in order to run afmtodit.\n\nafm-file is the AFM (Adobe Font Metric) file for the font.\n\nmap-file  is  a file that says which groff character names map onto each PostScript character\nname; this file should contain a sequence of lines of the form\nps-char groff-char\nwhere ps-char is the PostScript name of the character and groff-char is the groff name of the\ncharacter (as used in the groff font file).  The same ps-char can occur multiple times in the\nfile; each groff-char must occur at most once.  Lines starting with ‘#’ and blank  lines  are\nignored.   If  the  file  isn't found in the current directory, it is searched for in the de‐\nvps/generate subdirectory of the default font directory.\n\nIf a PostScript character is not mentioned in map-file, and a generic groff glyph name  can't\nbe  deduced  using  the  Adobe  Glyph List (AGL, built into afmtodit), then afmtodit puts the\nPostScript character into the groff font file as an unnamed character which can only  be  ac‐\ncessed by the ‘\\N’ escape sequence in a roff document.  In particular, this is true for glyph\nvariants named in the form “foo.bar”; all glyph names containing  one  or  more  periods  are\nmapped  to  unnamed entities.  If option -e is not specified, the encoding defined in the AFM\nfile (i.e., entries with non-negative character codes) is used.  Refer to section “Using Sym‐\nbols”  in  Groff:  The GNU Implementation of troff, the groff Texinfo manual, which describes\nhow groff glyph names are constructed.\n\nCharacters not encoded in the AFM file (i.e., entries which have ‘-1’ as the character  code)\nare  still  available in groff; they get glyph index values greater than 255 (or greater than\nthe biggest character code used in the AFM file in the unlikely case that it is greater  than\n255) in the groff font file.  Glyph indices of unencoded characters don't have a specific or‐\nder; it is best to access them with glyph names only.\n\nThe groff font file will be output to a file called font, unless the -o option is used.\n\nIf there is a downloadable font file for the font, it may be listed in the  file  /usr/share/\ngroff/1.22.4/font/devps/download; see grops(1).\n\nIf  the  -i option is used, afmtodit will automatically generate an italic correction, a left\nitalic correction and a subscript correction for each character (the  significance  of  these\nparameters  is  explained in grofffont(5)); these parameters may be specified for individual\ncharacters by adding to the afm-file lines of the form:\nitalicCorrection ps-char n\nleftItalicCorrection ps-char n\nsubscriptCorrection ps-char n\nwhere ps-char is the PostScript name of the character, and n is the desired value of the cor‐\nresponding  parameter in thousandths of an em.  These parameters are normally needed only for\nitalic (or oblique) fonts.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Whitespace is permitted between a command-line option and its argument.\n",
            "subsections": [
                {
                    "name": "-a",
                    "content": "ing of accents.  By default afmtodit uses the negative of the ItalicAngle specified in\nthe AFM file; with true italic fonts it is sometimes desirable to use a slant that  is\nless  than  this.  If you find that characters from an italic font have accents placed\ntoo far to the right over them, then use the -a option to  give  the  font  a  smaller\nslant.\n",
                    "flag": "-a"
                },
                {
                    "name": "-c",
                    "content": "",
                    "flag": "-c"
                },
                {
                    "name": "-d",
                    "content": "The  device  description file is desc-file rather than the default DESC.  If not found\nin the current directory, the devps subdirectory of  the  default  font  directory  is\nsearched  (this  is true for both the default device description file and a file given\nwith option -d).\n",
                    "flag": "-d"
                },
                {
                    "name": "-e",
                    "content": "The PostScript font should be reencoded to use the  encoding  described  in  enc-file.\nThe  format  of enc-file is described in grops(1).  If not found in the current direc‐\ntory, the devps subdirectory of the default font directory is searched.\n",
                    "flag": "-e"
                },
                {
                    "name": "-f",
                    "content": "",
                    "flag": "-f"
                },
                {
                    "name": "-i",
                    "content": "the  character's  italic correction is equal to n thousandths of an em plus the amount\nby which the right edge of the character's bounding box is to the right of the charac‐\nter's origin.  If this would result in a negative italic correction, use a zero italic\ncorrection instead.\n\nAlso generate a subscript correction equal to the product of the tangent of the  slant\nof  the  font  and four fifths of the x-height of the font.  If this would result in a\nsubscript correction greater than the italic correction, use  a  subscript  correction\nequal to the italic correction instead.\n\nAlso generate a left italic correction for each character equal to n thousandths of an\nem plus the amount by which the left edge of the character's bounding box  is  to  the\nleft of the character's origin.  The left italic correction may be negative unless op‐\ntion -m is given.\n\nThis option is normally needed only with italic (or oblique) fonts.   The  font  files\ndistributed with groff were created using an option of -i50 for italic fonts.\n",
                    "flag": "-i"
                },
                {
                    "name": "-o",
                    "content": "The output file is output-file instead of font.\n",
                    "flag": "-o"
                },
                {
                    "name": "-k",
                    "content": "fonts.\n",
                    "flag": "-k"
                },
                {
                    "name": "-m",
                    "content": "groff were created with -i0 -m to improve spacing with eqn(1).\n",
                    "flag": "-m"
                },
                {
                    "name": "-n",
                    "content": "fonts.\n",
                    "flag": "-n"
                },
                {
                    "name": "-s",
                    "content": "font file.\n",
                    "flag": "-s"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "-x",
                    "content": "",
                    "flag": "-x"
                }
            ]
        },
        "FILES": {
            "content": "/usr/share/groff/1.22.4/font/devps/DESC\nDevice description file.\n\n/usr/share/groff/1.22.4/font/devps/F\nFont description file for font F.\n\n/usr/share/groff/1.22.4/font/devps/download\nList of downloadable fonts.\n\n/usr/share/groff/1.22.4/font/devps/text.enc\nEncoding used for text fonts.\n\n/usr/share/groff/1.22.4/font/devps/generate/textmap\nStandard mapping.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Groff: The GNU Implementation of troff, by Trent A. Fisher and Werner Lemberg, is the primary\ngroff manual.  Section “Using Symbols” may be of particular note.  You can browse it interac‐\ntively with “info '(groff)Using Symbols'”.\n\ngroff(1), gropdf(1), grops(1), grofffont(5), perl(1)\n\n\n\ngroff 1.22.4                                23 March 2022                                AFMTODIT(1)",
            "subsections": []
        }
    },
    "summary": "afmtodit - create font files for use with groff -Tps and -Tpdf",
    "flags": [
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": "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)."
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": "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 direc‐ tory, the devps subdirectory of the default font directory is searched."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-i",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "The output file is output-file instead of font."
        },
        {
            "flag": "-k",
            "long": null,
            "arg": null,
            "description": "fonts."
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "groff were created with -i0 -m to improve spacing with eqn(1)."
        },
        {
            "flag": "-n",
            "long": null,
            "arg": null,
            "description": "fonts."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "font file."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "groff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/groff/1/json"
        },
        {
            "name": "gropdf",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gropdf/1/json"
        },
        {
            "name": "grops",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grops/1/json"
        },
        {
            "name": "grofffont",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/grofffont/5/json"
        },
        {
            "name": "perl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/perl/1/json"
        }
    ]
}