# gsftopk - render a ghostscript font in TeX pk form - man(1) - [phpMan]


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

## NAME
       gsftopk - render a ghostscript font in TeX pk form

## SYNOPSIS
       **gsftopk  **[-i  _path_]  [-q] [-t] [--debug=_n_] [--dosnames] [--interpreter=_path_] [--mapline=_line_]
       [--mapfile=_file_] [--quiet] [--test] [--help] [--version] _font_ _dpi_

## ARGUMENTS
       _font_  Name of the font to be created.

       _dpi_   Desired resolution of the font to be created, in dots per inch.  This  may  be  a  real
             number.

## DESCRIPTION
       **gsftopk **is a program which calls up the ghostscript program [**gs**(1)](https://www.chedong.com/phpMan.php/man/gs/1/markdown) to render a given font at a
       given  resolution.  It packs the resulting characters into the **pk **file format and writes them
       to a file whose name is formed from the font name and the resolution (rounded to the  nearest
       integer).   The  font  may  be in any format acceptable to Ghostscript, including ._pfa_, ._pfb_,
       ._gsf_, and ._ttf_ files.

       This program should normally be called by a script, such as **mktexpk**, to create fonts  on  de‐
       mand.

       **gsftopk  **obtains  the  character  widths from the ._tfm_ file, which must exist in the standard
       search path.  It also must be able to find the font in a map file (such as **psfonts.map**), for‐
       matted as in [**dvips**(1)](https://www.chedong.com/phpMan.php/man/dvips/1/markdown)), unless the **--mapline **option is used.  The set of map files  is  given
       by  the  **--mapfile  **option, or in the files **config.ps**, **$HOME/.dvipsrc**, and **config.gsftopk **(as
       would be used by **dvips -Pgsftopk**).

       The following **pk **"specials" are added at the end of the output file, to provide  an  internal
       check  on  the  contents  of  the  file:  "**jobname=_**font_", "**mag=1**", "**mode=modeless**", and "**pix‐**
       **els_per_inch=_**dpi_".  This is in accordance with the TeX Directory Standard (TDS).

## OPTIONS
       **--debug=_**n_
              Set the **Kpathsea **debug flags according to the integer _n_.

### --dosnames
              Use a name of the form _font_**.pk **instead of _font_**._**dpi_**pk**.

### -h --help
              Print a brief help synopsis and exit.

### -i _ --interpreter=_
              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_.

### -q --quiet
              Operate quietly; i.e., without writing any messages to the standard output.

### -t --test
              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).

### -v --version
              Print the version number and exit.

## ENVIRONMENT VARIABLES
       **DVIPSRC         **Name of file to read instead of **$HOME/.dvipsrc**.  This should be the full name
                       of the file (in other words, no path searching algorithms are applied).

       **GSFTOPKFONTS    **See **TFMFONTS.**

       **GSFTOPKHEADERS  **See **TEXPSHEADERS.**

       **PSHEADERS       **See **TEXPSHEADERS.**

       **TEXCONFIG       **Colon-separated list of paths to search for map files.  An extra colon in the
                       list  will  include  the  compiled-in  default paths at that point.  A double
                       slash will enable recursive subdirectory searching at that point in the path.

       **TFMFONTS        **Colon-separated list of paths to search for the ._tfm_ file associated with the
                       font.  Double slashes and extra colons behave as with **TEXCONFIG.  **This infor‐
                       mation may also be supplied by using the environment  variables  **TFMFONTS  **or
                       **GSFTOPKFONTS.   **These environment variables are checked in the order **GSFTOPK‐**
                       **FONTS, TFMFONTS, TFMFONTS; **the first one (if any) having a value is used.

       **TEXPSHEADERS    **Colon-separated list of paths to search for the Ghostscript driver file  **ren‐**
                       **der.ps  **and  for any PostScript header or font files (._enc_, ._pfa_, ._pfb_, ._gsf_,
                       or ._ttf_ files).  Double slashes and extra colons behave  as  with  **TEXCONFIG.**
                       This  information  may  also  be  supplied by using the environment variables
                       **PSHEADERS **or **GSFTOPKHEADERS.  **These environment variables are checked in  the
                       order  **GSFTOPKHEADERS, TEXPSHEADERS, PSHEADERS; **the first one (if any) having
                       a value is used.

       **TFMFONTS        **See **TFMFONTS.**

## CONFIGURATION
       In order to determine the set of map files to be used and the  path  for  finding  PostScript
       files, **gsftopk **reads, in order, the files **config.ps**, **.dvipsrc**, and **config.gsftopk**.  The files
       **config.ps  **and  **config.gsftopk **are searched for using the environment variable **TEXCONFIG, **the
       **Kpathsea **configuration file, or the compiled-in default paths.  The file **.dvipsrc **is searched
       for in the user's home directory.

       These files are in the same format as for **dvips **(as well as being  in  the  same  locations).
       The entries used by **gsftopk **are as follows.

       H _path_ Indicates  that  the  Ghostscript  driver file **render.ps **and the PostScript header and
              font files are to be searched for using _path_.

       p _file_ Indicates that the list of map files is to be erased and replaced by _file_.

       p +_file_
              Indicates that _file_ is to be added to the list of map files.

       All other entries are ignored.

       This is similar to the handling of these options when running **dvips -Pgsftopk**.  For more  de‐
       tails, see the **Kpathsea **manual.

## BUGS
       **gsftopk  **sometimes  has trouble with fonts with very complicated characters (such as the Seal
       of the University of California).  This is because **gsftopk **uses the **charpath **operator to  de‐
       termine  the  bounding  box of each character.  If the character is too complicated, then old
       versions of Ghostscript fail, causing **gsftopk **to terminate with an error message

              **Call to gs stopped by signal 10**

       (The number may vary from system to system; it corresponds to a bus error or  a  segmentation
       fault.)   The best way to fix this bug is to install a current version of ghostscript.  As an
       alternative, **gsftopk **can be instructed to use the bounding box provided with the font (if one
       exists) instead of finding a bounding box for each character.  To do this, include the string

              **/usefontbbox true def**

       in the font map file; _e.g._,

              **ucseal "/usefontbbox true def"**

       This will not affect use of the font by **dvips**.

## SEE ALSO
       [**gs**(1)](https://www.chedong.com/phpMan.php/man/gs/1/markdown), [**gftopk**(1)](https://www.chedong.com/phpMan.php/man/gftopk/1/markdown), [**tex**(1)](https://www.chedong.com/phpMan.php/man/tex/1/markdown), [**xdvi**(1)](https://www.chedong.com/phpMan.php/man/xdvi/1/markdown), [**dvips**(1)](https://www.chedong.com/phpMan.php/man/dvips/1/markdown)

## AUTHOR
       Written by Paul Vojta.  This program was inspired by Karl Berry's **gsrenderfont**.

## MODIFICATIONS
       Modified by Yves Arrouye to use Karl Berry's **Kpathsea **library.

                                          28 November 1998                                [_GSFTOPK_(1)](https://www.chedong.com/phpMan.php/man/GSFTOPK/1/markdown)
