summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/man/man1/gsftopk.1
blob: cbbafa8e60956359d5568ac3d09a0d2c182f0efc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
.\" Copyright (c) 1993-1998  Paul Vojta
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a copy
.\" of this software and associated documentation files (the "Software"), to
.\" deal in the Software without restriction, including without limitation the
.\" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
.\" sell copies of the Software, and to permit persons to whom the Software is
.\" furnished to do so, subject to the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included in
.\" all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
.\" PAUL VOJTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
.\" IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"

.\" small and boldface (not all -man's provide it)
.de SB
\&\fB\s-1\&\\$1 \\$2\s0\fR
..
.TH GSFTOPK 1 "28 November 1998"
.SH NAME
gsftopk \- render a ghostscript font in TeX pk form
.SH SYNOPSIS
.B gsftopk
[\-i \fIpath\fP]
[\-q]
[\-t]
[\-\-debug=\fIn\fP]
[\-\-dosnames]
[\-\-interpreter=\fIpath\fP]
[\-\-mapline=\fIline\fP]
[\-\-mapfile=\fIfile\fP]
[\-\-quiet]
[\-\-test]
[\-\-help]
[\-\-version]
.I font
.I dpi
.SH ARGUMENTS
.IP \fIfont\fP \w'\fIfont\fP'u+2m
Name of the font to be created.
.IP \fIdpi\fP
Desired resolution of the font to be created, in dots per inch.  This may
be a real number.
.SH DESCRIPTION
.B gsftopk
is a program which calls up the ghostscript program
.BR gs (1)
to render a given font at a given resolution.  It packs the resulting
characters into the
.B 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
.RI . pfa ,
.RI . pfb ,
.RI . gsf ,
and
.RI . ttf
files.
.PP
This program should normally be called by a script, such as
.BR mktexpk ,
to create fonts on demand.
.PP
.B gsftopk
obtains the character widths from the
.RI . 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
.BR psfonts.map ),
formatted as in
.BR dvips (1)),
unless the
.B \-\-mapline
option is used.  The set of map files is given by the
.B \-\-mapfile
option, or in the files
.BR config.ps ,
.BR $HOME/.dvipsrc ,
and
.B config.gsftopk
(as would be used by
.BR "dvips -Pgsftopk" ).
.PP
The following
.B pk
"specials" are added at the end of the output file, to provide an internal
check on the contents of the file:
"\fBjobname=\fP\fIfont\fP",
"\fBmag=1\fP",
"\fBmode=modeless\fP", and
"\fBpixels_per_inch=\fP\fIdpi\fP".
This is in accordance with the TeX Directory Standard (TDS).
.SH OPTIONS
.TP
.B \-\-debug=\fIn\fP
Set the
.B Kpathsea
debug flags according to the integer
.IR n .
.TP
.B \-\-dosnames
Use a name of the form
.IB font .pk
instead of
.IB font . dpi pk\fR.\fP
.TP
.B \-h\fR,\fP \-\-help
Print a brief help synopsis and exit.
.TP
.B \-i \fIpath\fP\fR,\fP \-\-interpreter=\fIpath\fP
Use
.I path
as the Ghostscript interpreter.
.TP
.B \-\-mapfile=\fIfile\fP
Use
.I file
to look for the map information for
.IR font .
This should be the full name of the file (in other words, no path searching
algorithms are applied).
.TP
.B \-\-mapline=\fIline\fP
Use
.I line
instead of looking for an entry in a map file.
The first word of
.I line
must match
.IR font .
.TP
.B \-q\fR,\fP \-\-quiet
Operate quietly; i.e., without writing any messages to the standard output.
.TP
.B \-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
.I dpi
argument is optional (since the font will not be generated).
.TP
.B \-v\fR,\fP \-\-version
Print the version number and exit.
.SH ENVIRONMENT VARIABLES
.IP \fBDVIPSRC\fP \w'\fBGSFTOPKHEADERS\fP'u+2m
Name of file to read instead of
.BR $HOME/.dvipsrc .
This should be the full name of the file (in other words, no path searching
algorithms are applied).
.IP \fBGSFTOPKFONTS\fP
See
.SB TFMFONTS.
.IP \fBGSFTOPKHEADERS\fP
See
.SB TEXPSHEADERS.
.IP \fBPSHEADERS\fP
See
.SB TEXPSHEADERS.
.IP \fBTEXCONFIG\fP
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.
.IP \fBTFMFONTS\fP
Colon-separated list of paths to search for the
.RI . 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.
.IP \fBTEXPSHEADERS\fP
Colon-separated list of paths to search for the Ghostscript driver file
.B render.ps
and for any PostScript header or font files
.RI (. enc ,
.RI . pfa ,
.RI . pfb ,
.RI . gsf ,
or
.RI . 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.
.IP \fBTFMFONTS\fP
See
.SB TFMFONTS.
.SH CONFIGURATION
In order to determine the set of map files to be used and the path for
finding PostScript files,
.B gsftopk
reads, in order, the files
.BR config.ps ,
.BR .dvipsrc ,
and
.BR config.gsftopk .
The files
.B config.ps
and
.B config.gsftopk
are searched for using the environment variable
.SB TEXCONFIG,
the
.B Kpathsea
configuration file,
or the compiled-in default paths.  The file
.B .dvipsrc
is searched for in the user's home directory.
.PP
These files are in the same format as for
.B dvips
(as well as being in the same locations).  The entries used by
.B gsftopk
are as follows.
.TP
.RI "H " path
Indicates that the Ghostscript driver file
.B render.ps
and the PostScript header and font files are to be searched for using
.IR path .
.TP
.RI "p " file
Indicates that the list of map files is to be erased and replaced by
.IR file .
.TP
.RI "p +" file
Indicates that
.I file
is to be added to the list of map files.
.PP
All other entries are ignored.
.PP
This is similar to the handling of these options when running
.BR "dvips -Pgsftopk" .
For more details, see the
.B Kpathsea
manual.
.SH BUGS
.B gsftopk
sometimes has trouble with fonts with very complicated characters
(such as the Seal of the University of California).  This is because
.B gsftopk
uses the
.B charpath
operator to determine the bounding box of each character.  If the character
is too complicated, then old versions of Ghostscript fail, causing
.B gsftopk
to terminate with an error message
.IP
.B "Call to gs stopped by signal 10"
.LP
(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,
.B 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
.IP
.B /usefontbbox true def
.LP
in the font map file;
.IR e.g. ,
.IP
.B ucseal """/usefontbbox true def"""
.LP
This will not affect use of the font by
.BR dvips .
.SH SEE ALSO
.BR gs (1),
.BR gftopk (1),
.BR tex (1),
.BR xdvi (1),
.BR dvips (1)
.SH AUTHOR
Written by Paul Vojta.  This program was inspired by Karl Berry's
.BR gsrenderfont .
.SH MODIFICATIONS
Modified by Yves Arrouye to use Karl Berry's
.B Kpathsea
library.