| 1 |
.\" Copyright (c) 1993-1998 Paul Vojta |
| 2 |
.\" |
| 3 |
.\" Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 |
.\" of this software and associated documentation files (the "Software"), to |
| 5 |
.\" deal in the Software without restriction, including without limitation the |
| 6 |
.\" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 7 |
.\" sell copies of the Software, and to permit persons to whom the Software is |
| 8 |
.\" furnished to do so, subject to the following conditions: |
| 9 |
.\" |
| 10 |
.\" The above copyright notice and this permission notice shall be included in |
| 11 |
.\" all copies or substantial portions of the Software. |
| 12 |
.\" |
| 13 |
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 14 |
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 |
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 16 |
.\" PAUL VOJTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
| 17 |
.\" IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 18 |
.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 19 |
.\" |
| 20 |
|
| 21 |
.\" small and boldface (not all -man's provide it) |
| 22 |
.de SB |
| 23 |
\&\fB\s-1\&\\$1 \\$2\s0\fR |
| 24 |
.. |
| 25 |
.TH GSFTOPK 1 "28 November 1998" |
| 26 |
.SH NAME |
| 27 |
gsftopk \- render a ghostscript font in TeX pk form |
| 28 |
.SH SYNOPSIS |
| 29 |
.B gsftopk |
| 30 |
[\-i \fIpath\fP] |
| 31 |
[\-q] |
| 32 |
[\-t] |
| 33 |
[\-\-debug=\fIn\fP] |
| 34 |
[\-\-dosnames] |
| 35 |
[\-\-interpreter=\fIpath\fP] |
| 36 |
[\-\-mapline=\fIline\fP] |
| 37 |
[\-\-mapfile=\fIfile\fP] |
| 38 |
[\-\-quiet] |
| 39 |
[\-\-test] |
| 40 |
[\-\-help] |
| 41 |
[\-\-version] |
| 42 |
.I font |
| 43 |
.I dpi |
| 44 |
.SH ARGUMENTS |
| 45 |
.IP \fIfont\fP \w'\fIfont\fP'u+2m |
| 46 |
Name of the font to be created. |
| 47 |
.IP \fIdpi\fP |
| 48 |
Desired resolution of the font to be created, in dots per inch. This may |
| 49 |
be a real number. |
| 50 |
.SH DESCRIPTION |
| 51 |
.B gsftopk |
| 52 |
is a program which calls up the ghostscript program |
| 53 |
.BR gs (1) |
| 54 |
to render a given font at a given resolution. It packs the resulting |
| 55 |
characters into the |
| 56 |
.B pk |
| 57 |
file format and writes them to a file whose name is formed from the font |
| 58 |
name and the resolution (rounded to the nearest integer). The font may |
| 59 |
be in any format acceptable to Ghostscript, including |
| 60 |
.RI . pfa , |
| 61 |
.RI . pfb , |
| 62 |
.RI . gsf , |
| 63 |
and |
| 64 |
.RI . ttf |
| 65 |
files. |
| 66 |
.PP |
| 67 |
This program should normally be called by a script, such as |
| 68 |
.BR mktexpk , |
| 69 |
to create fonts on demand. |
| 70 |
.PP |
| 71 |
.B gsftopk |
| 72 |
obtains the character widths from the |
| 73 |
.RI . tfm |
| 74 |
file, which must exist in the standard search path. It also must be |
| 75 |
able to find the font in a map file (such as |
| 76 |
.BR psfonts.map ), |
| 77 |
formatted as in |
| 78 |
.BR dvips (1)), |
| 79 |
unless the |
| 80 |
.B \-\-mapline |
| 81 |
option is used. The set of map files is given by the |
| 82 |
.B \-\-mapfile |
| 83 |
option, or in the files |
| 84 |
.BR config.ps , |
| 85 |
.BR $HOME/.dvipsrc , |
| 86 |
and |
| 87 |
.B config.gsftopk |
| 88 |
(as would be used by |
| 89 |
.BR "dvips -Pgsftopk" ). |
| 90 |
.PP |
| 91 |
The following |
| 92 |
.B pk |
| 93 |
"specials" are added at the end of the output file, to provide an internal |
| 94 |
check on the contents of the file: |
| 95 |
"\fBjobname=\fP\fIfont\fP", |
| 96 |
"\fBmag=1\fP", |
| 97 |
"\fBmode=modeless\fP", and |
| 98 |
"\fBpixels_per_inch=\fP\fIdpi\fP". |
| 99 |
This is in accordance with the TeX Directory Standard (TDS). |
| 100 |
.SH OPTIONS |
| 101 |
.TP |
| 102 |
.B \-\-debug=\fIn\fP |
| 103 |
Set the |
| 104 |
.B Kpathsea |
| 105 |
debug flags according to the integer |
| 106 |
.IR n . |
| 107 |
.TP |
| 108 |
.B \-\-dosnames |
| 109 |
Use a name of the form |
| 110 |
.IB font .pk |
| 111 |
instead of |
| 112 |
.IB font . dpi pk\fR.\fP |
| 113 |
.TP |
| 114 |
.B \-h\fR,\fP \-\-help |
| 115 |
Print a brief help synopsis and exit. |
| 116 |
.TP |
| 117 |
.B \-i \fIpath\fP\fR,\fP \-\-interpreter=\fIpath\fP |
| 118 |
Use |
| 119 |
.I path |
| 120 |
as the Ghostscript interpreter. |
| 121 |
.TP |
| 122 |
.B \-\-mapfile=\fIfile\fP |
| 123 |
Use |
| 124 |
.I file |
| 125 |
to look for the map information for |
| 126 |
.IR font . |
| 127 |
This should be the full name of the file (in other words, no path searching |
| 128 |
algorithms are applied). |
| 129 |
.TP |
| 130 |
.B \-\-mapline=\fIline\fP |
| 131 |
Use |
| 132 |
.I line |
| 133 |
instead of looking for an entry in a map file. |
| 134 |
The first word of |
| 135 |
.I line |
| 136 |
must match |
| 137 |
.IR font . |
| 138 |
.TP |
| 139 |
.B \-q\fR,\fP \-\-quiet |
| 140 |
Operate quietly; i.e., without writing any messages to the standard output. |
| 141 |
.TP |
| 142 |
.B \-t\fR,\fP \-\-test |
| 143 |
Test run: return zero status if the font can be found in the map file(s), |
| 144 |
and nonzero status if it cannot. If this option is specified, then the |
| 145 |
.I dpi |
| 146 |
argument is optional (since the font will not be generated). |
| 147 |
.TP |
| 148 |
.B \-v\fR,\fP \-\-version |
| 149 |
Print the version number and exit. |
| 150 |
.SH ENVIRONMENT VARIABLES |
| 151 |
.IP \fBDVIPSRC\fP \w'\fBGSFTOPKHEADERS\fP'u+2m |
| 152 |
Name of file to read instead of |
| 153 |
.BR $HOME/.dvipsrc . |
| 154 |
This should be the full name of the file (in other words, no path searching |
| 155 |
algorithms are applied). |
| 156 |
.IP \fBGSFTOPKFONTS\fP |
| 157 |
See |
| 158 |
.SB TFMFONTS. |
| 159 |
.IP \fBGSFTOPKHEADERS\fP |
| 160 |
See |
| 161 |
.SB TEXPSHEADERS. |
| 162 |
.IP \fBPSHEADERS\fP |
| 163 |
See |
| 164 |
.SB TEXPSHEADERS. |
| 165 |
.IP \fBTEXCONFIG\fP |
| 166 |
Colon-separated list of paths to search for map files. |
| 167 |
An extra colon in the list will include the |
| 168 |
compiled-in default paths at that point. A double slash will enable recursive |
| 169 |
subdirectory searching at that point in the path. |
| 170 |
.IP \fBTFMFONTS\fP |
| 171 |
Colon-separated list of paths to search for the |
| 172 |
.RI . tfm |
| 173 |
file associated with the font. Double slashes and extra colons behave as with |
| 174 |
.SB TEXCONFIG. |
| 175 |
This information may also be supplied by using the environment variables |
| 176 |
.SB TFMFONTS |
| 177 |
or |
| 178 |
.SB GSFTOPKFONTS. |
| 179 |
These environment variables are checked in the order |
| 180 |
.SB GSFTOPKFONTS, |
| 181 |
.SB TFMFONTS, |
| 182 |
.SB TFMFONTS; |
| 183 |
the first one (if any) having a value is used. |
| 184 |
.IP \fBTEXPSHEADERS\fP |
| 185 |
Colon-separated list of paths to search for the Ghostscript driver file |
| 186 |
.B render.ps |
| 187 |
and for any PostScript header or font files |
| 188 |
.RI (. enc , |
| 189 |
.RI . pfa , |
| 190 |
.RI . pfb , |
| 191 |
.RI . gsf , |
| 192 |
or |
| 193 |
.RI . ttf |
| 194 |
files). Double slashes and extra colons behave as with |
| 195 |
.SB TEXCONFIG. |
| 196 |
This information may also be supplied by using the environment variables |
| 197 |
.SB PSHEADERS |
| 198 |
or |
| 199 |
.SB GSFTOPKHEADERS. |
| 200 |
These environment variables are checked in the order |
| 201 |
.SB GSFTOPKHEADERS, |
| 202 |
.SB TEXPSHEADERS, |
| 203 |
.SB PSHEADERS; |
| 204 |
the first one (if any) having a value is used. |
| 205 |
.IP \fBTFMFONTS\fP |
| 206 |
See |
| 207 |
.SB TFMFONTS. |
| 208 |
.SH CONFIGURATION |
| 209 |
In order to determine the set of map files to be used and the path for |
| 210 |
finding PostScript files, |
| 211 |
.B gsftopk |
| 212 |
reads, in order, the files |
| 213 |
.BR config.ps , |
| 214 |
.BR .dvipsrc , |
| 215 |
and |
| 216 |
.BR config.gsftopk . |
| 217 |
The files |
| 218 |
.B config.ps |
| 219 |
and |
| 220 |
.B config.gsftopk |
| 221 |
are searched for using the environment variable |
| 222 |
.SB TEXCONFIG, |
| 223 |
the |
| 224 |
.B Kpathsea |
| 225 |
configuration file, |
| 226 |
or the compiled-in default paths. The file |
| 227 |
.B .dvipsrc |
| 228 |
is searched for in the user's home directory. |
| 229 |
.PP |
| 230 |
These files are in the same format as for |
| 231 |
.B dvips |
| 232 |
(as well as being in the same locations). The entries used by |
| 233 |
.B gsftopk |
| 234 |
are as follows. |
| 235 |
.TP |
| 236 |
.RI "H " path |
| 237 |
Indicates that the Ghostscript driver file |
| 238 |
.B render.ps |
| 239 |
and the PostScript header and font files are to be searched for using |
| 240 |
.IR path . |
| 241 |
.TP |
| 242 |
.RI "p " file |
| 243 |
Indicates that the list of map files is to be erased and replaced by |
| 244 |
.IR file . |
| 245 |
.TP |
| 246 |
.RI "p +" file |
| 247 |
Indicates that |
| 248 |
.I file |
| 249 |
is to be added to the list of map files. |
| 250 |
.PP |
| 251 |
All other entries are ignored. |
| 252 |
.PP |
| 253 |
This is similar to the handling of these options when running |
| 254 |
.BR "dvips -Pgsftopk" . |
| 255 |
For more details, see the |
| 256 |
.B Kpathsea |
| 257 |
manual. |
| 258 |
.SH BUGS |
| 259 |
.B gsftopk |
| 260 |
sometimes has trouble with fonts with very complicated characters |
| 261 |
(such as the Seal of the University of California). This is because |
| 262 |
.B gsftopk |
| 263 |
uses the |
| 264 |
.B charpath |
| 265 |
operator to determine the bounding box of each character. If the character |
| 266 |
is too complicated, then old versions of Ghostscript fail, causing |
| 267 |
.B gsftopk |
| 268 |
to terminate with an error message |
| 269 |
.IP |
| 270 |
.B "Call to gs stopped by signal 10" |
| 271 |
.LP |
| 272 |
(The number may vary from system to system; it corresponds to a bus error |
| 273 |
or a segmentation fault.) The best way to fix this bug is to install a |
| 274 |
current version of ghostscript. As an alternative, |
| 275 |
.B gsftopk |
| 276 |
can be instructed to use the bounding box provided with the font (if one |
| 277 |
exists) instead of finding a bounding box for each character. To do this, |
| 278 |
include the string |
| 279 |
.IP |
| 280 |
.B /usefontbbox true def |
| 281 |
.LP |
| 282 |
in the font map file; |
| 283 |
.IR e.g. , |
| 284 |
.IP |
| 285 |
.B ucseal """/usefontbbox true def""" |
| 286 |
.LP |
| 287 |
This will not affect use of the font by |
| 288 |
.BR dvips . |
| 289 |
.SH SEE ALSO |
| 290 |
.BR gs (1), |
| 291 |
.BR gftopk (1), |
| 292 |
.BR tex (1), |
| 293 |
.BR xdvi (1), |
| 294 |
.BR dvips (1) |
| 295 |
.SH AUTHOR |
| 296 |
Written by Paul Vojta. This program was inspired by Karl Berry's |
| 297 |
.BR gsrenderfont . |
| 298 |
.SH MODIFICATIONS |
| 299 |
Modified by Yves Arrouye to use Karl Berry's |
| 300 |
.B Kpathsea |
| 301 |
library. |