1. NAME▲
gsftopk - render a ghostscript font in TeX pk form
2. SYNOPSIS ▲
gsftopk [-i path] [-q] [-t] [--debug=n] [--dosnames] [--interpreter=path] [--mapline=line] [--mapfile=file] [--quiet] [--test] [--help] [--version] fontdpi
3. ARGUMENTS ▲
font +2m 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.
4. DESCRIPTION ▲
gsftopk is a program which calls up the ghostscript program
R gs (1) 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
R mktexpk , to create fonts on demand.
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
R psfonts.map ), formatted as in
R dvips (1)), unless the
--mapline option is used. The set of map files is given by the
--mapfile option, or in the files
R config.ps ,
R $HOME/.dvipsrc , and
config.gsftopk (as would be used by
R
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 "pixels_per_inch=dpi". This is in accordance with the TeX Directory Standard (TDS).
5. OPTIONS ▲
--debug=n
Set the
Kpathsea debug flags according to the integer n .
--dosnames
Use a name of the form .IB font .pk instead of .IB font . dpi pk\fR.\fP
-h\fR,\fP --help
Print a brief help synopsis and exit.
-i path\fR,\fP --interpreter=path
Use pathas the Ghostscript interpreter.
--mapfile=file
Use fileto 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 lineinstead of looking for an entry in a map file. The first word of linemust match font .
-q\fR,\fP --quiet
Operate quietly; i.e., without writing any messages to the standard output.
-t\fR,\fP --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 dpiargument is optional (since the font will not be generated).
-v\fR,\fP --version
Print the version number and exit.
6. ENVIRONMENT VARIABLES ▲
DVIPSRC +2m Name of file to read instead of
R $HOME/.dvipsrc . This should be the full name of the file (in other words, no path searching algorithms are applied).
GSFTOPKFONTS See .SB TFMFONTS.
GSFTOPKHEADERS See .SB TEXPSHEADERS.
PSHEADERS See .SB 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 .SB TEXCONFIG. This information may also be supplied by using the environment variables .SB TFMFONTS or .SB GSFTOPKFONTS. These environment variables are checked in the order .SB GSFTOPKFONTS, .SB TFMFONTS, .SB TFMFONTS; the first one (if any) having a value is used.
TEXPSHEADERS Colon-separated list of paths to search for the Ghostscript driver file
render.ps and for any PostScript header or font files (. enc , . pfa , . pfb , . gsf , or . ttf files). Double slashes and extra colons behave as with .SB TEXCONFIG. This information may also be supplied by using the environment variables .SB PSHEADERS or .SB GSFTOPKHEADERS. These environment variables are checked in the order .SB GSFTOPKHEADERS, .SB TEXPSHEADERS, .SB PSHEADERS; the first one (if any) having a value is used.
TFMFONTS See .SB TFMFONTS.
7. 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
R config.ps ,
R .dvipsrc , and
R config.gsftopk . The files
config.ps and
config.gsftopk are searched for using the environment variable .SB 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 fileis 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
R For more details, see the
Kpathsea manual.
8. 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 determine 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
This will not affect use of the font by
R dvips .
9. SEE ALSO ▲
R gs (1),
R gftopk (1),
R tex (1),
R xdvi (1),
R dvips (1)
10. AUTHOR ▲
Written by Paul Vojta. This program was inspired by Karl Berry's
R gsrenderfont .
11. MODIFICATIONS ▲
Modified by Yves Arrouye to use Karl Berry's
Kpathsea library.