{
    "mode": "man",
    "parameter": "gsftopk",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/gsftopk/1/json",
    "generated": "2026-10-09T15:54:31Z",
    "synopsis": "gsftopk  [-i  path]  [-q] [-t] [--debug=n] [--dosnames] [--interpreter=path] [--mapline=line]\n[--mapfile=file] [--quiet] [--test] [--help] [--version] font dpi",
    "sections": {
        "NAME": {
            "content": "gsftopk - render a ghostscript font in TeX pk form\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "gsftopk  [-i  path]  [-q] [-t] [--debug=n] [--dosnames] [--interpreter=path] [--mapline=line]\n[--mapfile=file] [--quiet] [--test] [--help] [--version] font dpi\n",
            "subsections": []
        },
        "ARGUMENTS": {
            "content": "font  Name of the font to be created.\n\ndpi   Desired resolution of the font to be created, in dots per inch.  This  may  be  a  real\nnumber.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "gsftopk is a program which calls up the ghostscript program gs(1) to render a given font at a\ngiven  resolution.  It packs the resulting characters into the pk file format and writes them\nto a file whose name is formed from the font name and the resolution (rounded to the  nearest\ninteger).   The  font  may  be in any format acceptable to Ghostscript, including .pfa, .pfb,\n.gsf, and .ttf files.\n\nThis program should normally be called by a script, such as mktexpk, to create fonts  on  de‐\nmand.\n\ngsftopk  obtains  the  character  widths from the .tfm file, which must exist in the standard\nsearch path.  It also must be able to find the font in a map file (such as psfonts.map), for‐\nmatted as in dvips(1)), unless the --mapline option is used.  The set of map files  is  given\nby  the  --mapfile  option, or in the files config.ps, $HOME/.dvipsrc, and config.gsftopk (as\nwould be used by dvips -Pgsftopk).\n\nThe following pk \"specials\" are added at the end of the output file, to provide  an  internal\ncheck  on  the  contents  of  the  file:  \"jobname=font\", \"mag=1\", \"mode=modeless\", and \"pix‐\nelsperinch=dpi\".  This is in accordance with the TeX Directory Standard (TDS).\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "--debug=n\nSet the Kpathsea debug flags according to the integer n.\n",
            "subsections": [
                {
                    "name": "--dosnames",
                    "content": "Use a name of the form font.pk instead of font.dpipk.\n",
                    "long": "--dosnames"
                },
                {
                    "name": "-h --help",
                    "content": "Print a brief help synopsis and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-i _ --interpreter=_",
                    "content": "Use path as the Ghostscript interpreter.\n\n--mapfile=file\nUse file to look for the map information for font.  This should be the  full  name  of\nthe file (in other words, no path searching algorithms are applied).\n\n--mapline=line\nUse  line  instead of looking for an entry in a map file.  The first word of line must\nmatch font.\n",
                    "flag": "-i",
                    "long": "--interpreter",
                    "arg": "_"
                },
                {
                    "name": "-q --quiet",
                    "content": "Operate quietly; i.e., without writing any messages to the standard output.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-t --test",
                    "content": "Test run:  return zero status if the font can be found in the map file(s), and nonzero\nstatus if it cannot.  If this option is specified, then the dpi argument  is  optional\n(since the font will not be generated).\n",
                    "flag": "-t",
                    "long": "--test"
                },
                {
                    "name": "-v --version",
                    "content": "Print the version number and exit.\n",
                    "flag": "-v",
                    "long": "--version"
                }
            ]
        },
        "ENVIRONMENT VARIABLES": {
            "content": "DVIPSRC         Name of file to read instead of $HOME/.dvipsrc.  This should be the full name\nof the file (in other words, no path searching algorithms are applied).\n\nGSFTOPKFONTS    See TFMFONTS.\n\nGSFTOPKHEADERS  See TEXPSHEADERS.\n\nPSHEADERS       See TEXPSHEADERS.\n\nTEXCONFIG       Colon-separated list of paths to search for map files.  An extra colon in the\nlist  will  include  the  compiled-in  default paths at that point.  A double\nslash will enable recursive subdirectory searching at that point in the path.\n\nTFMFONTS        Colon-separated list of paths to search for the .tfm file associated with the\nfont.  Double slashes and extra colons behave as with TEXCONFIG.  This infor‐\nmation may also be supplied by using the environment  variables  TFMFONTS  or\nGSFTOPKFONTS.   These environment variables are checked in the order GSFTOPK‐\nFONTS, TFMFONTS, TFMFONTS; the first one (if any) having a value is used.\n\nTEXPSHEADERS    Colon-separated list of paths to search for the Ghostscript driver file  ren‐\nder.ps  and  for any PostScript header or font files (.enc, .pfa, .pfb, .gsf,\nor .ttf files).  Double slashes and extra colons behave  as  with  TEXCONFIG.\nThis  information  may  also  be  supplied by using the environment variables\nPSHEADERS or GSFTOPKHEADERS.  These environment variables are checked in  the\norder  GSFTOPKHEADERS, TEXPSHEADERS, PSHEADERS; the first one (if any) having\na value is used.\n\nTFMFONTS        See TFMFONTS.\n",
            "subsections": []
        },
        "CONFIGURATION": {
            "content": "In order to determine the set of map files to be used and the  path  for  finding  PostScript\nfiles, gsftopk reads, in order, the files config.ps, .dvipsrc, and config.gsftopk.  The files\nconfig.ps  and  config.gsftopk are searched for using the environment variable TEXCONFIG, the\nKpathsea configuration file, or the compiled-in default paths.  The file .dvipsrc is searched\nfor in the user's home directory.\n\nThese files are in the same format as for dvips (as well as being  in  the  same  locations).\nThe entries used by gsftopk are as follows.\n\nH path Indicates  that  the  Ghostscript  driver file render.ps and the PostScript header and\nfont files are to be searched for using path.\n\np file Indicates that the list of map files is to be erased and replaced by file.\n\np +file\nIndicates that file is to be added to the list of map files.\n\nAll other entries are ignored.\n\nThis is similar to the handling of these options when running dvips -Pgsftopk.  For more  de‐\ntails, see the Kpathsea manual.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "gsftopk  sometimes  has trouble with fonts with very complicated characters (such as the Seal\nof the University of California).  This is because gsftopk uses the charpath operator to  de‐\ntermine  the  bounding  box of each character.  If the character is too complicated, then old\nversions of Ghostscript fail, causing gsftopk to terminate with an error message\n\nCall to gs stopped by signal 10\n\n(The number may vary from system to system; it corresponds to a bus error or  a  segmentation\nfault.)   The best way to fix this bug is to install a current version of ghostscript.  As an\nalternative, gsftopk can be instructed to use the bounding box provided with the font (if one\nexists) instead of finding a bounding box for each character.  To do this, include the string\n\n/usefontbbox true def\n\nin the font map file; e.g.,\n\nucseal \"/usefontbbox true def\"\n\nThis will not affect use of the font by dvips.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "gs(1), gftopk(1), tex(1), xdvi(1), dvips(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Written by Paul Vojta.  This program was inspired by Karl Berry's gsrenderfont.\n",
            "subsections": []
        },
        "MODIFICATIONS": {
            "content": "Modified by Yves Arrouye to use Karl Berry's Kpathsea library.\n\n28 November 1998                                GSFTOPK(1)",
            "subsections": []
        }
    },
    "summary": "gsftopk - render a ghostscript font in TeX pk form",
    "flags": [
        {
            "flag": "",
            "long": "--dosnames",
            "arg": null,
            "description": "Use a name of the form font.pk instead of font.dpipk."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Print a brief help synopsis and exit."
        },
        {
            "flag": "-i",
            "long": "--interpreter",
            "arg": "_",
            "description": "Use path as the Ghostscript interpreter. --mapfile=file Use file to look for the map information for font. This should be the full name of the file (in other words, no path searching algorithms are applied). --mapline=line Use line instead of looking for an entry in a map file. The first word of line must match font."
        },
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Operate quietly; i.e., without writing any messages to the standard output."
        },
        {
            "flag": "-t",
            "long": "--test",
            "arg": null,
            "description": "Test run: return zero status if the font can be found in the map file(s), and nonzero status if it cannot. If this option is specified, then the dpi argument is optional (since the font will not be generated)."
        },
        {
            "flag": "-v",
            "long": "--version",
            "arg": null,
            "description": "Print the version number and exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "gs",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gs/1/json"
        },
        {
            "name": "gftopk",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gftopk/1/json"
        },
        {
            "name": "tex",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tex/1/json"
        },
        {
            "name": "xdvi",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/xdvi/1/json"
        },
        {
            "name": "dvips",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dvips/1/json"
        }
    ]
}