2 |
- |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
2 |
<html>
|
|
|
3 |
<head>
|
|
|
4 |
<title>Fonts and font facilities supplied with Ghostscript</title>
|
|
|
5 |
<!-- $Id: Fonts.htm,v 1.51 2005/10/20 19:46:23 ray Exp $ -->
|
|
|
6 |
<!-- Originally: fonts.txt -->
|
|
|
7 |
<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style">
|
|
|
8 |
</head>
|
|
|
9 |
|
|
|
10 |
<body>
|
|
|
11 |
<!-- [1.0 begin visible header] ============================================ -->
|
|
|
12 |
|
|
|
13 |
<!-- [1.1 begin headline] ================================================== -->
|
|
|
14 |
|
|
|
15 |
<h1>Fonts and font facilities supplied with Ghostscript</h1>
|
|
|
16 |
|
|
|
17 |
<!-- [1.1 end headline] ==================================================== -->
|
|
|
18 |
|
|
|
19 |
<!-- [1.2 begin table of contents] ========================================= -->
|
|
|
20 |
|
|
|
21 |
<h2>Table of contents</h2>
|
|
|
22 |
|
|
|
23 |
<blockquote><ul>
|
|
|
24 |
<li><a href="#About">About Ghostscript fonts</a>
|
|
|
25 |
<li><a href="#Free_fonts">Ghostscript's free fonts</a>
|
|
|
26 |
<li><a href="#Other_fonts">Other free fonts</a>
|
|
|
27 |
<ul>
|
|
|
28 |
<li><a href="#Computer_Modern">Computer Modern Fontmap</a>
|
|
|
29 |
<li><a href="#Chinese">Free Chinese (Hanzi) fonts</a>
|
|
|
30 |
<li><a href="#Japanese">Free Japanese (Kanji) fonts</a>
|
|
|
31 |
<li><a href="#Unicode_CMaps">Unicode CMaps</a>
|
|
|
32 |
<li><a href="#Cyrillic">Free Cyrillic fonts</a>
|
|
|
33 |
<li><a href="#Partial_Unicode_fonts">(Partial) Unicode fonts</a>
|
|
|
34 |
</ul>
|
|
|
35 |
<li><a href="#Get_fonts">How Ghostscript gets fonts when it runs</a>
|
|
|
36 |
<li><a href="#Platform_fonts">Platform fonts</a>
|
|
|
37 |
<li><a href="#Add_fonts">Adding your own fonts</a>
|
|
|
38 |
<ul>
|
|
|
39 |
<li><a href="#Convert_BDF">Converting BDF fonts</a>
|
|
|
40 |
</ul>
|
|
|
41 |
<li><a href="#For_developers">For developers only</a>
|
|
|
42 |
<ul>
|
|
|
43 |
<li><a href="#Font_contents">Contents of fonts</a>
|
|
|
44 |
<li><a href="#Precompiling">Precompiling fonts</a>
|
|
|
45 |
<li><a href="#Short_identifiers">Precompiling fonts on platforms with identifier length limits</a>
|
|
|
46 |
<li><a href="#Unique_IDs">Font names and unique IDs</a>
|
|
|
47 |
<li><a href="#Codes">Codes used to make font file names</a>
|
|
|
48 |
</ul>
|
|
|
49 |
<li><a href="#Use_gs_fonts_with_X">Using Ghostscript fonts on X Windows displays</a>
|
|
|
50 |
<ul>
|
|
|
51 |
<li><a href="#Using_xset">Using <b><tt>xset</tt></b></a>
|
|
|
52 |
<li><a href="#Font_permanent_installation">Permanent installation</a>
|
|
|
53 |
<ul>
|
|
|
54 |
<li><a href="#Configure_xfs">Configuring the <b><tt>xfs</tt></b> font server</a>
|
|
|
55 |
<li><a href="#Configure_Xfree86">Xfree86 display servers</a>
|
|
|
56 |
</ul>
|
|
|
57 |
</ul>
|
|
|
58 |
</ul></blockquote>
|
|
|
59 |
|
|
|
60 |
<!-- [1.2 end table of contents] =========================================== -->
|
|
|
61 |
|
|
|
62 |
<!-- [1.3 begin hint] ====================================================== -->
|
|
|
63 |
|
|
|
64 |
<p>For other information, see the <a href="Readme.htm">Ghostscript
|
|
|
65 |
overview</a>.
|
|
|
66 |
|
|
|
67 |
<!-- [1.3 end hint] ======================================================== -->
|
|
|
68 |
|
|
|
69 |
<hr>
|
|
|
70 |
|
|
|
71 |
<!-- [1.0 end visible header] ============================================== -->
|
|
|
72 |
|
|
|
73 |
<!-- [2.0 begin contents] ================================================== -->
|
|
|
74 |
|
|
|
75 |
<h2><a name="About"></a>About Ghostscript fonts</h2>
|
|
|
76 |
|
|
|
77 |
<p>
|
|
|
78 |
Ghostscript is distributed with two kinds of files related to fonts:
|
|
|
79 |
|
|
|
80 |
<ul>
|
|
|
81 |
<li>the fonts themselves in individual files, and
|
|
|
82 |
<li>a file "<tt><b>Fontmap</b></tt>" that defines for
|
|
|
83 |
Ghostscript which file represents which font.
|
|
|
84 |
</ul>
|
|
|
85 |
|
|
|
86 |
<p>
|
|
|
87 |
Additionally, a file <tt><b>cidfmap</b></tt> can be used
|
|
|
88 |
to create CID fonts for CJK font files on the system See
|
|
|
89 |
the section on <a href="Use.htm#CIDFontSubstitution">CID Font Substitution</a>
|
|
|
90 |
for details.
|
|
|
91 |
|
|
|
92 |
<p>
|
|
|
93 |
Most of the font files supplied with Ghostscript have the extension
|
|
|
94 |
<tt><b>.pfb</b></tt>, and a few have <tt><b>.pfa</b></tt> or
|
|
|
95 |
<tt><b>.gsf</b></tt>. Each file defines one ordinary PostScript Type 1
|
|
|
96 |
outline font which any PostScript language interpreter can use. Files with
|
|
|
97 |
<tt><b>.pfa</b></tt> or <tt><b>.pfb</b></tt> extensions are also compatible
|
|
|
98 |
with Adobe Type Manager (ATM) and with tools that don't include a full
|
|
|
99 |
PostScript language interpreter; files with <tt><b>.gsf</b></tt> extension
|
|
|
100 |
are incompatible with ATM and other tools. Ghostscript compiled with the
|
|
|
101 |
"ttfont" option can also use TrueType fonts with the extension
|
|
|
102 |
<tt><b>.ttf</b></tt>.
|
|
|
103 |
|
|
|
104 |
<p><a name="Fontmap"></a>
|
|
|
105 |
When Ghostscript needs a font, it must have some way to know where to look
|
|
|
106 |
for it: that's the purpose of the <b><tt>Fontmap</tt></b> file, which
|
|
|
107 |
associates the names of <em>fonts</em> such as <b><tt>/Times-Roman</tt></b>
|
|
|
108 |
with the names of font <em>files</em>, such as
|
|
|
109 |
<tt><b>n021003l.pfb</b></tt>. <b><tt>Fontmap</tt></b> can also create
|
|
|
110 |
aliases for font names, so that for instance,
|
|
|
111 |
<b><tt>/NimbusNo9L-Regu</tt></b> means the same font as
|
|
|
112 |
<b><tt>/Times-Roman</tt></b>.
|
|
|
113 |
|
|
|
114 |
<hr>
|
|
|
115 |
|
|
|
116 |
<h2><a name="Free_fonts"></a>Ghostscript's free fonts</h2>
|
|
|
117 |
|
|
|
118 |
<p>
|
|
|
119 |
Two sets of free fonts are supplied for Ghostscript:
|
|
|
120 |
|
|
|
121 |
<ul>
|
|
|
122 |
<li>35 commercial-quality Type 1 basic PostScript fonts -- Times,
|
|
|
123 |
Helvetica, Courier, Symbol, etc. -- contributed by URW++ Design and
|
|
|
124 |
Development Incorporated, of Hamburg, Germany
|
|
|
125 |
(<a href="http://www.urwpp.de/">http://www.urwpp.de/</a>). Fontmap names
|
|
|
126 |
them all.
|
|
|
127 |
|
|
|
128 |
<li>A miscellaneous set including Cyrillic, kana, and fonts derived from
|
|
|
129 |
the free Hershey fonts, with improvements (such as adding accented
|
|
|
130 |
characters) by Thomas Wolff. The Hershey-based fonts are quite different
|
|
|
131 |
from traditional printer or display fonts; you can read about them in more
|
|
|
132 |
detail in the <a href="Hershey.htm">documentation on Hershey fonts</a>.
|
|
|
133 |
|
|
|
134 |
</ul>
|
|
|
135 |
|
|
|
136 |
<blockquote><table cellpadding=0 cellspacing=0>
|
|
|
137 |
<tr><th colspan=7 bgcolor="#CCCC00"><hr><font size="+1">Font packages</font><hr>
|
|
|
138 |
<tr> <td><b>System</b>
|
|
|
139 |
<td>
|
|
|
140 |
<td><b>File name</b>
|
|
|
141 |
<td>
|
|
|
142 |
<td><b>Contents</b>
|
|
|
143 |
<td>
|
|
|
144 |
<td><b>Types</b>
|
|
|
145 |
<tr> <td colspan=7><hr>
|
|
|
146 |
<tr valign=top> <td>DOS and<br>MS Windows
|
|
|
147 |
<td>
|
|
|
148 |
<td><b><tt>gs###fn1.zip</tt></b>
|
|
|
149 |
<td>
|
|
|
150 |
<td>Basic
|
|
|
151 |
<td>
|
|
|
152 |
<td><b><tt>.pfb</tt></b>
|
|
|
153 |
<tr valign=top> <td>
|
|
|
154 |
<td>
|
|
|
155 |
<td><b><tt>gs###fn2.zip</tt></b>
|
|
|
156 |
<td>
|
|
|
157 |
<td>Miscellaneous
|
|
|
158 |
<td>
|
|
|
159 |
<td>Various, for<br>different fonts
|
|
|
160 |
<tr> <td colspan=7><hr>
|
|
|
161 |
<tr valign=top> <td>Unix
|
|
|
162 |
<td>
|
|
|
163 |
<td><b><tt>ghostscript-fonts-std-#.##.tar.gz</tt></b>
|
|
|
164 |
<td>
|
|
|
165 |
<td>Basic
|
|
|
166 |
<td>
|
|
|
167 |
<td><b><tt>.afm</tt></b>,
|
|
|
168 |
<b><tt>.pfb</tt></b>,<br><b><tt>.pfm</tt></b> <tr valign=top> <td>
|
|
|
169 |
<td>
|
|
|
170 |
<td><b><tt>ghostscript-fonts-other-#.##.tar.gz</tt></b>
|
|
|
171 |
<td>
|
|
|
172 |
<td>Miscellaneous
|
|
|
173 |
<td>
|
|
|
174 |
<td><b><tt>.afm</tt></b>,
|
|
|
175 |
<b><tt>.gsf</tt></b>,<br><b><tt>.pfa</tt></b>, <b><tt>.pfm</tt></b>
|
|
|
176 |
|
|
|
177 |
</table>
|
|
|
178 |
</blockquote>
|
|
|
179 |
|
|
|
180 |
<p>
|
|
|
181 |
"#.##" and "###" are the version number with and without punctuation.
|
|
|
182 |
Fonts can be found at
|
|
|
183 |
|
|
|
184 |
<blockquote>
|
|
|
185 |
ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/gs###/ (for a particular version)<br>
|
|
|
186 |
<a href="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/fonts/"
|
|
|
187 |
class="offsite">ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/fonts/</a> (for
|
|
|
188 |
several versions)
|
|
|
189 |
</blockquote>
|
|
|
190 |
|
|
|
191 |
<hr>
|
|
|
192 |
|
|
|
193 |
<h2><a name="Other_fonts"></a>Other free fonts</h2>
|
|
|
194 |
|
|
|
195 |
<h3><a name="Computer_Modern"></a>Computer Modern Fontmap</h3>
|
|
|
196 |
|
|
|
197 |
<p>
|
|
|
198 |
Don Knuth's Computer Modern fonts are popular, free, and widely available.
|
|
|
199 |
A Fontmap appropriate for these fonts is available from:
|
|
|
200 |
|
|
|
201 |
<blockquote>
|
|
|
202 |
<a
|
|
|
203 |
href="ftp://tug.ctan.org/tex-archive/fonts/cm/ps-type1/contrib/Fontmap.cmr"
|
|
|
204 |
class="offsite">
|
|
|
205 |
ftp://tug.ctan.org/tex-archive/fonts/cm/ps-type1/contrib/Fontmap.cmr</a>
|
|
|
206 |
</blockquote>
|
|
|
207 |
|
|
|
208 |
<p>
|
|
|
209 |
or from other <a href="http://www.ctan.org/" class="offsite">CTAN</a> sites.
|
|
|
210 |
|
|
|
211 |
<h3><a name="Chinese"></a>Free Chinese (Hanzi) fonts</h3>
|
|
|
212 |
|
|
|
213 |
<p>
|
|
|
214 |
A free Chinese font, originally provided by courtesy of Jackson Technology,
|
|
|
215 |
Ltd., Taiwan under the GPL and now distributed by the Taiwan NeXT User
|
|
|
216 |
Group, is available from:
|
|
|
217 |
|
|
|
218 |
<blockquote>
|
|
|
219 |
<a href="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/3rdparty/fonts/hanzi/"
|
|
|
220 |
class="offsite">ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/3rdparty/fonts/hanzi/</a>
|
|
|
221 |
</blockquote>
|
|
|
222 |
|
|
|
223 |
<p>
|
|
|
224 |
Prof. Wu of the Department of Economics of National Taiwan University has
|
|
|
225 |
created several free Type 1 Chinese fonts designed to be used with TeX. His
|
|
|
226 |
e-mail is <a
|
|
|
227 |
href="mailto:ntut019@ccms.ntu.edu.tw">ntut019@ccms.ntu.edu.tw</a>. The
|
|
|
228 |
fonts are available from
|
|
|
229 |
|
|
|
230 |
<blockquote>
|
|
|
231 |
<a href="ftp://cle.linux.org.tw/pub/fonts/cwfont/"
|
|
|
232 |
class="offsite">ftp://cle.linux.org.tw/pub/fonts/cwfont/</a><br>
|
|
|
233 |
</blockquote>
|
|
|
234 |
|
|
|
235 |
<p>
|
|
|
236 |
Arphic Technology Co., Ltd., has made several free TrueType Chinese fonts
|
|
|
237 |
available under the Arphic Public License, a license very similar to the
|
|
|
238 |
GPL. (Ghostscript can use TrueType fonts if Ghostscript is compiled with
|
|
|
239 |
the <tt><b>ttfont</b></tt> feature included: see <a
|
|
|
240 |
href="Make.htm#Features_and_devices">here</a> for more information.) The
|
|
|
241 |
fonts and license are available from
|
|
|
242 |
|
|
|
243 |
<blockquote>
|
|
|
244 |
<a href="ftp://cle.linux.org.tw/pub/fonts/arphic/"
|
|
|
245 |
class="offsite">ftp://cle.linux.org.tw/pub/fonts/arphic/</a><br>
|
|
|
246 |
</blockquote>
|
|
|
247 |
|
|
|
248 |
<h3><a name="Japanese"></a>Free Japanese (Kanji) fonts</h3>
|
|
|
249 |
|
|
|
250 |
<p>
|
|
|
251 |
Mr. Tetsurou Tanaka of the Department of Engineering, University of Tokyo,
|
|
|
252 |
has created a set of free Kanji fonts available from
|
|
|
253 |
|
|
|
254 |
<blockquote>
|
|
|
255 |
<a href="ftp://ftp.ipl.t.u-tokyo.ac.jp/Font/"
|
|
|
256 |
class="offsite">ftp://ftp.ipl.t.u-tokyo.ac.jp/Font/</a><br>
|
|
|
257 |
</blockquote>
|
|
|
258 |
|
|
|
259 |
<p>
|
|
|
260 |
along with documentation in Japanese and English describing their
|
|
|
261 |
conditions of use and how to use them. An older copy of these fonts, under
|
|
|
262 |
somewhat different names, is available at the Ghostscript site:
|
|
|
263 |
|
|
|
264 |
<blockquote>
|
|
|
265 |
<a href="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/3rdparty/fonts/kanji/">
|
|
|
266 |
ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/3rdparty/fonts/kanji/</a><br>
|
|
|
267 |
</blockquote>
|
|
|
268 |
|
|
|
269 |
<p>
|
|
|
270 |
Mr. Norio Katayama has done some work to make Ghostscript work well with
|
|
|
271 |
Kanji fonts. An easy-to-install Kanji font for Ghostscript, with
|
|
|
272 |
installation instructions, is at
|
|
|
273 |
|
|
|
274 |
<blockquote>
|
|
|
275 |
<a href="http://www.cit.ics.saitama-u.ac.jp/~far/howto/gs-ttf.html"
|
|
|
276 |
class="offsite">http://www.cit.ics.saitama-u.ac.jp/~far/howto/gs-ttf.html</a>
|
|
|
277 |
</blockquote>
|
|
|
278 |
|
|
|
279 |
<p>
|
|
|
280 |
The same site has patches to make Ghostscript work with Japanese VF fonts,
|
|
|
281 |
with documentation in both English and Japanese:
|
|
|
282 |
|
|
|
283 |
<blockquote>
|
|
|
284 |
<a href="http://www.cit.ics.saitama-u.ac.jp/~far/howto/gs-vflib.html"
|
|
|
285 |
class="offsite">http://www.cit.ics.saitama-u.ac.jp/~far/howto/gs-vflib.html</a>
|
|
|
286 |
</blockquote>
|
|
|
287 |
|
|
|
288 |
<p>
|
|
|
289 |
Here are some other resources in Japanese relating to VFlib and using
|
|
|
290 |
Ghostscript with Japanese fonts:
|
|
|
291 |
|
|
|
292 |
<blockquote><dl compact>
|
|
|
293 |
<dt><a href="http://kakugawa.aial.hiroshima-u.ac.jp/~kakugawa/Hacks/"
|
|
|
294 |
class="offsite">http://kakugawa.aial.hiroshima-u.ac.jp/~kakugawa/Hacks/</a>
|
|
|
295 |
<dt><a href="http://itohws03.ee.noda.sut.ac.jp/~matsuda/VFlib-FT/"
|
|
|
296 |
class="offsite">http://itohws03.ee.noda.sut.ac.jp/~matsuda/VFlib-FT/</a>
|
|
|
297 |
<dd>Author <<a href="mailto:matsuda@itohws01.ee.noda.sut.ac.jp">matsuda@itohws01.ee.noda.sut.ac.jp</a>>
|
|
|
298 |
<dt><a href="http://www.rd.nacsis.ac.jp/~katayama/homepage/ghostscript/Japanese.html"
|
|
|
299 |
class="offsite">http://www.rd.nacsis.ac.jp/~katayama/homepage/ghostscript/Japanese.html</a>
|
|
|
300 |
<dd>Author <<a href="mailto:katayama@rd.nacsis.ac.jp">katayama@rd.nacsis.ac.jp</a>>
|
|
|
301 |
</dl></blockquote>
|
|
|
302 |
|
|
|
303 |
<h3><a name="Unicode_CMaps"></a>Unicode CMaps</h3>
|
|
|
304 |
|
|
|
305 |
<p>
|
|
|
306 |
Some Unicode CMaps that can be used with Ghostscript are freely downloadable from
|
|
|
307 |
|
|
|
308 |
<blockquote>
|
|
|
309 |
<a href="ftp://ftp.oreilly.com/pub/examples/nutshell/ujip/adobe/"
|
|
|
310 |
class="offsite">ftp://ftp.oreilly.com/pub/examples/nutshell/ujip/adobe/</a>
|
|
|
311 |
</blockquote>
|
|
|
312 |
|
|
|
313 |
<h3><a name="Cyrillic"></a>Free Cyrillic fonts</h3>
|
|
|
314 |
|
|
|
315 |
<p>
|
|
|
316 |
N. Glonty and A. Samarin created in 1989 a Cyrillic extension of TeX's
|
|
|
317 |
"Computer Modern" fonts, now freely available through the
|
|
|
318 |
<a href="http://www.ctan.org/" class="offsite">Comprehensive TeX Archive Network</a> (CTAN),
|
|
|
319 |
for instance at
|
|
|
320 |
|
|
|
321 |
<blockquote>
|
|
|
322 |
<a href="ftp://ctan.tug.org/tex-archive/fonts/cyrillic/cmcyr/"
|
|
|
323 |
class="offsite">ftp://ctan.tug.org/tex-archive/fonts/cyrillic/cmcyr/</a>
|
|
|
324 |
</blockquote>
|
|
|
325 |
|
|
|
326 |
<p>
|
|
|
327 |
<a href="http://www.ctan.org/" class="offsite">CTAN's</a> entire collection of Cyrillic fonts
|
|
|
328 |
is, for instance, at
|
|
|
329 |
|
|
|
330 |
<blockquote>
|
|
|
331 |
<a href="ftp://ctan.tug.org/tex-archive/fonts/cyrillic/"
|
|
|
332 |
class="offsite">ftp://ctan.tug.org/tex-archive/fonts/cyrillic/</a>
|
|
|
333 |
</blockquote>
|
|
|
334 |
|
|
|
335 |
<p>
|
|
|
336 |
Basil K. Malyshev created the "Paradissa Fonts Collection" in 1993. It
|
|
|
337 |
contained 165 fonts, including the Glonty and Samarin font above plus other
|
|
|
338 |
Computer Modern, Euler, and LaTeX fonts, all in PostScript Type 1 format
|
|
|
339 |
with <code>.afm</code> and <code>.pfm</code> files, compatible with ATM.
|
|
|
340 |
The collection could once be found through CTAN, for instance at
|
|
|
341 |
|
|
|
342 |
<blockquote>
|
|
|
343 |
http://www.ctan.org/tex-archive/fonts/
|
|
|
344 |
<!-- orginal was ftp://ctan.tug.org/tex-archive/fonts/postscript/cm/ -->
|
|
|
345 |
</blockquote>
|
|
|
346 |
|
|
|
347 |
<p>
|
|
|
348 |
but the collection no longer seems to be available. However, the
|
|
|
349 |
<a href="http://www.ctan.org/tex-archive/fonts/" class="offsite">ctan fonts directory</a>
|
|
|
350 |
remains an excellent source of free fonts, many of which are offered in
|
|
|
351 |
postscript as well we as TeX Metafont format.
|
|
|
352 |
|
|
|
353 |
<hr>
|
|
|
354 |
|
|
|
355 |
<h3><a name="Partial_Unicode_fonts"></a>(Partial) Unicode fonts</h3>
|
|
|
356 |
|
|
|
357 |
<p>
|
|
|
358 |
George W. Wilson is distributing some free partial Unicode fonts he created.
|
|
|
359 |
These fonts currently lack Arabic and CJK characters, but they include a
|
|
|
360 |
very large subset of the remaining Unicode set. They are available in both
|
|
|
361 |
Type 1 and TrueType formats. See
|
|
|
362 |
|
|
|
363 |
<blockquote>
|
|
|
364 |
<a href="http://bibliofile.mc.duke.edu/gww/fonts/Unicode.html"
|
|
|
365 |
class="offsite">http://bibliofile.mc.duke.edu/gww/fonts/Unicode.html</a>
|
|
|
366 |
</blockquote>
|
|
|
367 |
|
|
|
368 |
<h2><a name="Get_fonts"></a>How Ghostscript gets fonts when it runs</h2>
|
|
|
369 |
|
|
|
370 |
<p>
|
|
|
371 |
Fonts occupy about 50KB each, so Ghostscript doesn't load them all
|
|
|
372 |
automatically when it runs. Instead, as part of normal initialization
|
|
|
373 |
Ghostscript runs a file <tt><b>gs_fonts.ps</b></tt>, which arranges to load
|
|
|
374 |
fonts on demand using information from the font map. To preload all of the
|
|
|
375 |
known fonts, invoke the procedure
|
|
|
376 |
|
|
|
377 |
<blockquote><tt><b>
|
|
|
378 |
loadallfonts
|
|
|
379 |
</b></tt></blockquote>
|
|
|
380 |
|
|
|
381 |
<p>
|
|
|
382 |
The file <tt><b>prfont.ps</b></tt> contains code to print a sample page of
|
|
|
383 |
a font. Load this program by including it in the <tt><b>gs</b></tt>
|
|
|
384 |
command line or by invoking
|
|
|
385 |
|
|
|
386 |
<blockquote><tt><b>
|
|
|
387 |
(prfont.ps) run
|
|
|
388 |
</b></tt></blockquote>
|
|
|
389 |
|
|
|
390 |
<p>
|
|
|
391 |
Then to produce a sampler of a particular font XYZ, invoke
|
|
|
392 |
|
|
|
393 |
<blockquote><tt><b>
|
|
|
394 |
/XYZ DoFont
|
|
|
395 |
</b></tt></blockquote>
|
|
|
396 |
|
|
|
397 |
<p>For example,
|
|
|
398 |
|
|
|
399 |
<blockquote><tt><b>
|
|
|
400 |
/Times-Roman DoFont
|
|
|
401 |
</b></tt></blockquote>
|
|
|
402 |
|
|
|
403 |
<p>
|
|
|
404 |
For more information about how Ghostscript loads fonts during execution,
|
|
|
405 |
see <a href="Use.htm#Font_lookup">here</a>.
|
|
|
406 |
|
|
|
407 |
<hr>
|
|
|
408 |
|
|
|
409 |
<h2><a name="Platform_fonts"></a>Platform fonts</h2>
|
|
|
410 |
|
|
|
411 |
<p>
|
|
|
412 |
Ghostscript displays text on screen using whatever font technology is
|
|
|
413 |
provided by the system on which it runs, by calling the system's API to
|
|
|
414 |
display text. On platforms with X Windows, this is X Windows; on MS
|
|
|
415 |
Windows it may be TrueType or ATM; Ghostscript neither knows nor cares.
|
|
|
416 |
|
|
|
417 |
<p>
|
|
|
418 |
The PostScript language specifies that fonts are data structures with
|
|
|
419 |
particular contents (for instance, they include a bounding box for the
|
|
|
420 |
font, an Encoding vector to specify the character set, etc.), and it is
|
|
|
421 |
common for PostScript files to use this fact; also, characters can be used
|
|
|
422 |
as clipping regions, and can be arbitrarily algorithmically rotated,
|
|
|
423 |
skewed, expanded or condensed, etc. Most of this information is available
|
|
|
424 |
in some form from the underlying graphics system, but one crucial piece is
|
|
|
425 |
not: the actual scalable outlines of the characters, which Ghostscript
|
|
|
426 |
needs in order to implement both clipping with character shapes and
|
|
|
427 |
arbitrarily transformed characters. Consequently
|
|
|
428 |
|
|
|
429 |
<blockquote>
|
|
|
430 |
Ghostscript needs the scalable outlines of any font mentioned in a
|
|
|
431 |
document, and loads them from the disk (<tt><b>.pfa</b></tt>,
|
|
|
432 |
<tt><b>.pfb</b></tt>, or <tt><b>.gsf</b></tt>
|
|
|
433 |
file) in the usual way, even if it uses the platform's font machinery to
|
|
|
434 |
display the characters. In other words, Ghostscript must still be able to
|
|
|
435 |
find its font files.
|
|
|
436 |
</blockquote>
|
|
|
437 |
|
|
|
438 |
<p>
|
|
|
439 |
To make matters worse, platforms use different names for their standard
|
|
|
440 |
fonts. For example, the Times Roman font, for which PostScript files use
|
|
|
441 |
the name "<b><tt>Times-Roman</tt></b>", may be known as
|
|
|
442 |
"<b><tt>Times-Roman</tt></b>", "<b><tt>Times Roman</tt></b>",
|
|
|
443 |
"<b><tt>Tms Rmn</tt></b>",
|
|
|
444 |
"<b><tt>Times New Roman</tt></b>", or
|
|
|
445 |
"<b><tt>TimesNewRoman</tt></b>". The name may even be completely
|
|
|
446 |
different: the usual Helvetica-equivalent TrueType font is called
|
|
|
447 |
"<b><tt>Arial</tt></b>". It is possible to deal with this situation by
|
|
|
448 |
introducing aliases in Fontmap, but there are two reasons why Ghostscript
|
|
|
449 |
does not currently do this:
|
|
|
450 |
|
|
|
451 |
<ol>
|
|
|
452 |
<li>Methods of naming in different systems are so unstandardized that there
|
|
|
453 |
seems to be no small set of alternative names likely to cover most
|
|
|
454 |
situations. All five of the names above for Times Roman have been seen
|
|
|
455 |
under Windows and OS/2, depending on the version of the system, whether it
|
|
|
456 |
uses TrueType or ATM, and other unknown factors.
|
|
|
457 |
|
|
|
458 |
<li>Each alias takes up space at run time. If each of the standard fonts
|
|
|
459 |
has three additional aliases, this might amount to 50KB of wasted space,
|
|
|
460 |
which may be a lot on some smaller systems.
|
|
|
461 |
</ol>
|
|
|
462 |
|
|
|
463 |
<p>
|
|
|
464 |
If you don't seem to be getting nice characters on the screen under MS
|
|
|
465 |
Windows, you can try adding aliases to Fontmap, according to the
|
|
|
466 |
documentation you'll find in there.
|
|
|
467 |
|
|
|
468 |
<hr>
|
|
|
469 |
|
|
|
470 |
<h2><a name="Add_fonts"></a>Adding your own fonts</h2>
|
|
|
471 |
|
|
|
472 |
<p>
|
|
|
473 |
Ghostscript can use any Type 0, 1, 3, 4, or 42 font acceptable to
|
|
|
474 |
other PostScript language interpreters or to ATM, including MultiMaster
|
|
|
475 |
fonts. Beginning with release 4.0, Ghostscript can also use TrueType fonts
|
|
|
476 |
if it was compiled with the "ttfont" option.
|
|
|
477 |
|
|
|
478 |
<p>
|
|
|
479 |
To add fonts of your own, you must edit Fontmap to include at the end an
|
|
|
480 |
entry for your new font; the format for entries is documented
|
|
|
481 |
in Fontmap itself. Since later entries in Fontmap override earlier
|
|
|
482 |
entries, a font you add at the end supersedes any corresponding fonts supplied
|
|
|
483 |
with Ghostscript and defined earlier in the file.
|
|
|
484 |
|
|
|
485 |
<p>
|
|
|
486 |
In the PC world, Type 1 fonts are customarily given names ending in
|
|
|
487 |
<tt><b>.PFA</b></tt> or <tt><b>.PFB</b></tt>. Ghostscript can use these
|
|
|
488 |
directly: you just need to make the entry in Fontmap. If you want to use
|
|
|
489 |
with Ghostscript a commercial Type 1 font (such as fonts obtained in
|
|
|
490 |
conjunction with Adobe Type Manager), please read carefully the license that
|
|
|
491 |
accompanies the font to satisfy yourself that you may do so legally; we take
|
|
|
492 |
no responsibility for any possible violations of such licenses. The same
|
|
|
493 |
applies to TrueType fonts.
|
|
|
494 |
|
|
|
495 |
<h3><a name="Convert_BDF"></a>Converting BDF fonts</h3>
|
|
|
496 |
|
|
|
497 |
<p>
|
|
|
498 |
Ghostscript provides a way to construct a (low-quality) Type 1 font from a
|
|
|
499 |
bitmap font in the BDF format popular in the Unix world. The shell script
|
|
|
500 |
<tt><b>bdftops</b></tt> (Unix) or the command file
|
|
|
501 |
<tt><b>bdftops.bat</b></tt> (DOS) converts a BDF file to a
|
|
|
502 |
scalable outline using <tt><b>bdftops.ps</b></tt> . Run the
|
|
|
503 |
shell command
|
|
|
504 |
|
|
|
505 |
<blockquote><tt><b>
|
|
|
506 |
bdftops BDF_filename [AFM_file1_name ...] gsf_filename fontname<br> UniqueID [XUID] [encodingname]
|
|
|
507 |
</b></tt></blockquote>
|
|
|
508 |
|
|
|
509 |
<p>
|
|
|
510 |
The arguments have these meanings:
|
|
|
511 |
<blockquote><table cellpadding=0 cellspacing=0>
|
|
|
512 |
<tr valign=top> <td><tt><b>BDF_filename</b></tt>
|
|
|
513 |
<td>
|
|
|
514 |
<td>Input bitmap file in BDF format
|
|
|
515 |
<td>
|
|
|
516 |
<td>
|
|
|
517 |
<tr valign=top> <td><tt><b>AFM_file1_name</b></tt>
|
|
|
518 |
<td>
|
|
|
519 |
<td>AFM files giving metrics
|
|
|
520 |
<td>
|
|
|
521 |
<td>(Optional)
|
|
|
522 |
<tr valign=top> <td><tt><b>gsf_filename</b></tt>
|
|
|
523 |
<td>
|
|
|
524 |
<td>Output file
|
|
|
525 |
<td>
|
|
|
526 |
<td>
|
|
|
527 |
<tr valign=top> <td><tt><b>fontname</b></tt>
|
|
|
528 |
<td>
|
|
|
529 |
<td>Name of the font
|
|
|
530 |
<td>
|
|
|
531 |
<td>
|
|
|
532 |
<tr valign=top> <td><tt><b>UniqueID</b></tt>
|
|
|
533 |
<td>
|
|
|
534 |
<td>UniqueID (<a href="#Unique_IDs">as described below</a>)
|
|
|
535 |
<td>
|
|
|
536 |
<td>
|
|
|
537 |
<tr valign=top> <td><tt><b>XUID</b></tt>
|
|
|
538 |
<td>
|
|
|
539 |
<td>XUID, in the form <tt><b>n1.n2.n3...</b></tt> (<a href="#Unique_IDs">as described below</a>)
|
|
|
540 |
<td>
|
|
|
541 |
<td>(Optional)
|
|
|
542 |
<tr valign=top> <td><tt><b>encodingname</b></tt>
|
|
|
543 |
<td>
|
|
|
544 |
<td>"StandardEncoding" (the default), "ISOLatin1Encoding",<br>"SymbolEncoding", "DingbatsEncoding"
|
|
|
545 |
<td>
|
|
|
546 |
<td>(Optional)
|
|
|
547 |
</table></blockquote>
|
|
|
548 |
|
|
|
549 |
<p>
|
|
|
550 |
For instance
|
|
|
551 |
|
|
|
552 |
<blockquote><tt><b>
|
|
|
553 |
bdftops pzdr.bdf ZapfDingbats.afm pzdr.gsf ZapfDingbats 4100000 1000000.1.41
|
|
|
554 |
</b></tt></blockquote>
|
|
|
555 |
|
|
|
556 |
<p>
|
|
|
557 |
Then make an entry in Fontmap for the <tt><b>.gsf</b></tt>
|
|
|
558 |
file (<tt><b>pzdr.gsf</b></tt> in the example) as
|
|
|
559 |
<a href="#Add_fonts">described above</a>.
|
|
|
560 |
|
|
|
561 |
<hr>
|
|
|
562 |
|
|
|
563 |
<h2><a name="For_developers"></a>For developers only</h2>
|
|
|
564 |
|
|
|
565 |
<p>
|
|
|
566 |
The rest of this document is very unlikely to be of value to ordinary
|
|
|
567 |
users.
|
|
|
568 |
|
|
|
569 |
<h3><a name="Font_contents"></a>Contents of fonts</h3>
|
|
|
570 |
|
|
|
571 |
<p>
|
|
|
572 |
As noted above, Ghostscript accepts fonts in the same formats as PostScript
|
|
|
573 |
interpreters. Type 0, 1, and 3 fonts are documented in the PostScript
|
|
|
574 |
Language Reference Manual (Second Edition); detailed documentation for Type
|
|
|
575 |
1 fonts appears in a separate Adobe book. Type 2 (compressed format) fonts
|
|
|
576 |
are documented in separate Adobe publications. Type 4 fonts are not
|
|
|
577 |
documented anywhere; they are essentially Type 1 fonts with a BuildChar or
|
|
|
578 |
BuildGlyph procedure. Types 9, 10, and 11 (CIDFontType 0, 1, and 2) and
|
|
|
579 |
Type 32 (downloaded bitmap) fonts are documented in Adobe supplements.
|
|
|
580 |
Type 42 (encapsulated TrueType) fonts are documented in an Adobe
|
|
|
581 |
supplement; the TrueType format is documented in publications available
|
|
|
582 |
from Apple and Microsoft. Ghostscript does not support Type 14 (Chameleon)
|
|
|
583 |
fonts, which use a proprietary Adobe format.
|
|
|
584 |
|
|
|
585 |
<h3><a name="Precompiling"></a>Precompiling fonts</h3>
|
|
|
586 |
|
|
|
587 |
<p>
|
|
|
588 |
You can precompile -- convert -- any Type 1 font into C, then compile and
|
|
|
589 |
build it into the Ghostscript executable. (Type 1 fonts include any font
|
|
|
590 |
whose name ends with <tt><b>.pfa</b></tt> or
|
|
|
591 |
<tt><b>.pfb</b></tt>, and it also includes all the
|
|
|
592 |
Ghostscript <tt><b>.gsf</b></tt> fonts except the Hershey
|
|
|
593 |
fonts.) This has no effect on rendering speed, but it eliminates the time
|
|
|
594 |
to load the font dynamically, which may make a big improvement in total
|
|
|
595 |
rendering time, especially for multi-page documents. It also reduces the
|
|
|
596 |
number of auxiliary files required at run time. Fonts precompiled and
|
|
|
597 |
built into Ghostscript this way need not appear in Fontmap, although if
|
|
|
598 |
they do appear there, no harm is done.
|
|
|
599 |
|
|
|
600 |
<p><a name="font2c"></a> The utility for precompiling fonts is named
|
|
|
601 |
<tt><b>font2c</b></tt>. Note that since
|
|
|
602 |
<tt><b>font2c</b></tt> uses the PostScript language program
|
|
|
603 |
<tt><b>font2c.ps</b></tt>, Ghostscript must already be
|
|
|
604 |
available to run it, and Fontmap must contain entries for the fonts you
|
|
|
605 |
want to compile. For example, to precompile the Times-Italic font,
|
|
|
606 |
|
|
|
607 |
<blockquote><tt><b>
|
|
|
608 |
font2c Times-Italic ptmri.c
|
|
|
609 |
</b></tt></blockquote>
|
|
|
610 |
|
|
|
611 |
<p>
|
|
|
612 |
The first argument ("<b><tt>Times-Italic</tt></b>" above) is the font's
|
|
|
613 |
name and the second ("<b><tt>ptmri.c</tt></b>") is the name of the
|
|
|
614 |
resulting C file. You can use any file name you want, as long as it ends
|
|
|
615 |
in "<tt><b>.c</b></tt>". It needn't be limited to eight characters unless
|
|
|
616 |
your operating system requires this. If "<b><tt>XYZ.gsf</tt></b>" or
|
|
|
617 |
"<b><tt>XYZ.pfa</tt></b>" is the font file's name in Fontmap,
|
|
|
618 |
"<b><tt>XYZ.c</tt></b>" is a good choice for the C file.
|
|
|
619 |
|
|
|
620 |
<p>
|
|
|
621 |
Under VMS, or other systems whose the C compilers limit the length of
|
|
|
622 |
identifiers, you must do something slightly more complicated; for that see
|
|
|
623 |
the section on <a href="#Short_identifiers">short identifiers in C</a>. On
|
|
|
624 |
VMS also, you must quote the font name ("{font name}") to preserve the
|
|
|
625 |
name's mixed upper and lower case. For VMS environments in general see
|
|
|
626 |
<a href="Make.htm#VMS">the VMS directions</a> in the documentation on
|
|
|
627 |
building Ghostscript, and ignore the rest of this section.
|
|
|
628 |
|
|
|
629 |
<p>
|
|
|
630 |
Note that fonts are not supplied with Ghostscript in precompiled form, since
|
|
|
631 |
those files are quite large and can easily be recreated using <a
|
|
|
632 |
href="#font2c"><tt><b>font2c</b></tt></a>. There is a makefile target to
|
|
|
633 |
run <tt><b>font2c</b></tt> on all the fonts supplied with Ghostscript.
|
|
|
634 |
Invoke it with
|
|
|
635 |
|
|
|
636 |
<blockquote><b><tt>
|
|
|
637 |
make fonts_standard_c
|
|
|
638 |
</tt></b></blockquote>
|
|
|
639 |
|
|
|
640 |
<p>Besides running <tt><b>font2c</b></tt>, you must compile the fonts and
|
|
|
641 |
link them into the executable. To do this, add the compiled fonts feature
|
|
|
642 |
to your platform-specific makefile. See the
|
|
|
643 |
<a href="Make.htm#Makefile_overview">overview of makefiles</a> in the
|
|
|
644 |
documentation on building Ghostscript for the list of makefiles for each
|
|
|
645 |
platform. Find the definition of the <tt><b>FEATURE_DEVS</b></tt> macro in
|
|
|
646 |
the makefile, which looks something like this:
|
|
|
647 |
|
|
|
648 |
<blockquote><tt><b>
|
|
|
649 |
FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)pipe.dev
|
|
|
650 |
</b></tt></blockquote>
|
|
|
651 |
|
|
|
652 |
<p>
|
|
|
653 |
and add "ccfonts.dev":
|
|
|
654 |
|
|
|
655 |
<blockquote><tt><b>
|
|
|
656 |
FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)pipe.dev $(PSD)ccfonts.dev
|
|
|
657 |
</b></tt></blockquote>
|
|
|
658 |
|
|
|
659 |
<p>
|
|
|
660 |
Next you must add the specific fonts to <tt><b>int.mak</b></tt>, the
|
|
|
661 |
platform-independent makefile for the interpreter. This makefile already
|
|
|
662 |
has rules for the standard fonts supplied with Ghostscript, so if you just
|
|
|
663 |
want to compile the standard fonts, you needn't do anything else. Now we
|
|
|
664 |
describe how to compile other fonts into the executable, such as the Utopia
|
|
|
665 |
or Kana fonts, or your own fonts.
|
|
|
666 |
|
|
|
667 |
<p>
|
|
|
668 |
Suppose you want to compile the Kana fonts into the executable. First pick
|
|
|
669 |
one of <b><tt>ccfonts10</tt></b> through <b><tt>ccfonts15</tt></b> as the
|
|
|
670 |
place you will do this, say <b><tt>ccfonts10</tt></b>. Add your compiled
|
|
|
671 |
font file names, for instance
|
|
|
672 |
|
|
|
673 |
<blockquote><tt><b>
|
|
|
674 |
ccfonts10_=$(CFOBJ)fhirw.$(OBJ)
|
|
|
675 |
</b></tt></blockquote>
|
|
|
676 |
|
|
|
677 |
<p>
|
|
|
678 |
(Note the underscore "_".) If this makes the line too long, use another
|
|
|
679 |
line of the same form, for instance,
|
|
|
680 |
|
|
|
681 |
<blockquote><tt><b>
|
|
|
682 |
ccfonts11_=$(CFOBJ)fkarw.$(OBJ)
|
|
|
683 |
</b></tt></blockquote>
|
|
|
684 |
|
|
|
685 |
<p>
|
|
|
686 |
Just below the <b><tt>ccfonts10_=</tt></b> line is a line
|
|
|
687 |
|
|
|
688 |
<blockquote><tt><b>
|
|
|
689 |
ccfonts10=
|
|
|
690 |
</b></tt></blockquote>
|
|
|
691 |
|
|
|
692 |
<p>
|
|
|
693 |
(Note no underscore.) Add your own fonts to the end of this line, replacing
|
|
|
694 |
dashes ("-") with underscores ("_") in the font names. For instance:
|
|
|
695 |
|
|
|
696 |
<blockquote><tt><b>
|
|
|
697 |
ccfonts10=Calligraphic_Hiragana
|
|
|
698 |
</b></tt></blockquote>
|
|
|
699 |
|
|
|
700 |
<p>
|
|
|
701 |
Again, if a line becomes too long, add another line of the same form, for
|
|
|
702 |
instance,
|
|
|
703 |
|
|
|
704 |
<blockquote><tt><b>
|
|
|
705 |
ccfonts10=Calligraphic_Hiragana<br>
|
|
|
706 |
ccfonts11=Calligraphic_Katakana
|
|
|
707 |
</b></tt></blockquote>
|
|
|
708 |
|
|
|
709 |
<p>
|
|
|
710 |
After all the lines of this form, add a pair of lines to compile each font,
|
|
|
711 |
separating these entries from the "ccfonts*" lines and from each other with
|
|
|
712 |
a blank line. In our example this becomes
|
|
|
713 |
|
|
|
714 |
<blockquote>
|
|
|
715 |
<pre>$(CFOBJ)fhirw.$(OBJ): $(CFGEN)fhirw.c $(CCFONT)
|
|
|
716 |
$(CFCC) $(CFO_)fhirw.$(OBJ) $(C_) $(CFGEN)fhirw.c
|
|
|
717 |
|
|
|
718 |
$(CFOBJ)fkarw.$(OBJ): $(CFGEN)fkarw.c $(CCFONT)
|
|
|
719 |
$(CFCC) $(CFO_)fkarw.$(OBJ) $(C_) $(CFGEN)fkarw.c
|
|
|
720 |
</pre></blockquote>
|
|
|
721 |
|
|
|
722 |
<p>
|
|
|
723 |
Finally, run <tt><b>make</b></tt> to build an executable that includes the
|
|
|
724 |
fonts you added. They are present in <b><tt>FontDirectory</tt></b> when
|
|
|
725 |
Ghostscript starts up.
|
|
|
726 |
|
|
|
727 |
<h3><a name="Short_identifiers"></a>Precompiling fonts on platforms with identifier length limits</h3>
|
|
|
728 |
|
|
|
729 |
<p>
|
|
|
730 |
On some platforms the C compiler or linker limits the number of significant
|
|
|
731 |
characters usable in an identifier. On such platforms, you must do a
|
|
|
732 |
little extra work.
|
|
|
733 |
|
|
|
734 |
<p>
|
|
|
735 |
Let <em><b>N</b></em> be the maximum number of significant characters in an
|
|
|
736 |
identifier (typically 31). For each font whose name is longer than
|
|
|
737 |
<em><b>N</b></em>-5 characters, pick an arbitrary identifier that we will
|
|
|
738 |
call the "short name". This can be any string you want, as long as it
|
|
|
739 |
contains only letters, digits, and underscores; is no longer than
|
|
|
740 |
<em><b>N</b></em>-5 characters; and is different from all other font names
|
|
|
741 |
and short names. A good choice for this is the name of the C file. There
|
|
|
742 |
is no harm in doing this for fonts with names shorter than
|
|
|
743 |
<em><b>N</b></em>-5 characters, but it's unnecessary.
|
|
|
744 |
|
|
|
745 |
<p>
|
|
|
746 |
You must do two different things for fonts that require a short name.
|
|
|
747 |
|
|
|
748 |
<ol>
|
|
|
749 |
<li>You must supply the short name as a third argument to
|
|
|
750 |
<tt><b>font2c</b></tt>. For example, to compile
|
|
|
751 |
<b><tt>NewCenturySchlbk-BoldItalic</tt></b> using the short name
|
|
|
752 |
<b><tt>pncbi</tt></b>,
|
|
|
753 |
|
|
|
754 |
<blockquote><tt><b>
|
|
|
755 |
font2c NewCenturySchlbk-BoldItalic pncbi.c pncbi
|
|
|
756 |
</b></tt></blockquote>
|
|
|
757 |
|
|
|
758 |
<li>
|
|
|
759 |
Then when you add the font name to the definition of one of the ccfonts*
|
|
|
760 |
macros in the makefile, use the short name, not the actual font name, for
|
|
|
761 |
instance,
|
|
|
762 |
|
|
|
763 |
<blockquote><table cellpadding=0 cellspacing=0>
|
|
|
764 |
<tr> <td>Use
|
|
|
765 |
<td>
|
|
|
766 |
<td><tt><b>ccfonts12=pncbi</b></tt>
|
|
|
767 |
<tr> <td>Rather than
|
|
|
768 |
<td>
|
|
|
769 |
<td><tt><b>ccfonts12=NewCenturySchlbk_BoldItalic</b></tt>
|
|
|
770 |
</table></blockquote>
|
|
|
771 |
</ol>
|
|
|
772 |
|
|
|
773 |
<p>
|
|
|
774 |
Everything else is as described above. This procedure doesn't change the
|
|
|
775 |
name of the font in Fontmap or as seen from within Ghostscript; it just
|
|
|
776 |
works around a limitation of some older compilers.
|
|
|
777 |
|
|
|
778 |
<hr>
|
|
|
779 |
|
|
|
780 |
<h3><a name="Unique_IDs"></a>Font names and unique IDs</h3>
|
|
|
781 |
|
|
|
782 |
<p>
|
|
|
783 |
If you create your own fonts and will use them only within your own
|
|
|
784 |
organization, you should use <tt><b>UniqueID</b></tt> values between
|
|
|
785 |
4000000 and 4999999, coded like this (see the <a href="#Codes">tables of
|
|
|
786 |
codes</a> for font file names below):
|
|
|
787 |
|
|
|
788 |
<blockquote><table cellpadding=0 cellspacing=0>
|
|
|
789 |
<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Coding of UniqueID "<tt><b>4TTWVE0</b></tt>"</font><hr>
|
|
|
790 |
<tr> <td><tt><b>TT</b></tt>
|
|
|
791 |
<td>
|
|
|
792 |
<td><a href="#Typeface">Typeface</a>
|
|
|
793 |
<td>
|
|
|
794 |
<td>two-digit identifier
|
|
|
795 |
<tr> <td><tt><b>W</b></tt>
|
|
|
796 |
<td>
|
|
|
797 |
<td><a href="#Weight">Weight</a>
|
|
|
798 |
<td>
|
|
|
799 |
<td>normal, bold, etc.
|
|
|
800 |
<tr> <td><tt><b>V</b></tt>
|
|
|
801 |
<td>
|
|
|
802 |
<td><a href="#Variant">Variant</a>
|
|
|
803 |
<td>
|
|
|
804 |
<td>normal, italic, etc.
|
|
|
805 |
<tr> <td><tt><b>E</b></tt>
|
|
|
806 |
<td>
|
|
|
807 |
<td><a href="#Expansion">Expansion</a>
|
|
|
808 |
<td>
|
|
|
809 |
<td>normal, condensed, etc.
|
|
|
810 |
</table></blockquote>
|
|
|
811 |
|
|
|
812 |
<p>
|
|
|
813 |
This scheme will not work forever: as soon there are more than 99
|
|
|
814 |
typefaces, or more than 9 weights or variants, we will have to do something
|
|
|
815 |
else. But it suffices for the near future.
|
|
|
816 |
|
|
|
817 |
<p>
|
|
|
818 |
If you plan to distribute fonts, ask Adobe to assign you some UniqueIDs and
|
|
|
819 |
also an <tt><b>XUID</b></tt> for your organization. Contact
|
|
|
820 |
|
|
|
821 |
<blockquote><address>
|
|
|
822 |
Unique ID Coordinator<br>
|
|
|
823 |
Adobe Developers Association<br>
|
|
|
824 |
Adobe Systems, Inc.<br>
|
|
|
825 |
345 Park Avenue<br>
|
|
|
826 |
San Jose, CA 95110-2704<br>
|
|
|
827 |
+1-408-536-9000 telephone (ADA)<br>
|
|
|
828 |
+1-408-536-6883 fax<br>
|
|
|
829 |
<a href="mailto:fontdev-person@adobe.com">fontdev-person@adobe.com</a><br>
|
|
|
830 |
</address></blockquote>
|
|
|
831 |
|
|
|
832 |
<p>
|
|
|
833 |
The XUID is a Level 2 PostScript feature that serves the same function as
|
|
|
834 |
the UniqueID, but is not limited to a single 24-bit integer. The
|
|
|
835 |
<tt><b>bdftops</b></tt> program creates XUIDs of the form
|
|
|
836 |
"<tt><b>[-X- 0 -U-]</b></tt>" where "<tt><b>-X-</b></tt>" is the
|
|
|
837 |
organization XUID and "<tt><b>-U-</b></tt>" is the UniqueID. (Aladdin
|
|
|
838 |
Enterprises' organization XUID, which appears in a few places in various
|
|
|
839 |
font-related files distributed with Ghostscript, is 107; do not use this for
|
|
|
840 |
your own fonts that you distribute.)
|
|
|
841 |
|
|
|
842 |
<p>
|
|
|
843 |
Because Ghostscript runs on many different systems, including DOS, the
|
|
|
844 |
names of font files can be no longer than 8 characters. We therefore
|
|
|
845 |
construct a font's filename <tt><b>FTTWVVVE.gsf</b></tt>
|
|
|
846 |
similarly to the construction for temporary UniqueIDs.
|
|
|
847 |
|
|
|
848 |
<blockquote><table cellpadding=0 cellspacing=0>
|
|
|
849 |
<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Coding of font file name "<tt><b>FTTWVVVE.gsf</b></tt>"</font><hr>
|
|
|
850 |
<tr> <td><tt><b>F</b></tt>
|
|
|
851 |
<td>
|
|
|
852 |
<td><a href="#Foundries">Foundry</a>
|
|
|
853 |
<td>
|
|
|
854 |
<td>
|
|
|
855 |
<tr> <td><tt><b>TT</b></tt>
|
|
|
856 |
<td>
|
|
|
857 |
<td><a href="#Typeface">Typeface</a>
|
|
|
858 |
<td>
|
|
|
859 |
<td>two-digit identifier
|
|
|
860 |
<tr> <td><tt><b>W</b></tt>
|
|
|
861 |
<td>
|
|
|
862 |
<td><a href="#Weight">Weight</a>
|
|
|
863 |
<td>
|
|
|
864 |
<td>normal, bold, etc.
|
|
|
865 |
<tr> <td><tt><b>V</b></tt>
|
|
|
866 |
<td>
|
|
|
867 |
<td><a href="#Variant">Variant</a>
|
|
|
868 |
<td>
|
|
|
869 |
<td>normal, italic, etc.
|
|
|
870 |
<tr> <td><tt><b>E</b></tt>
|
|
|
871 |
<td>
|
|
|
872 |
<td><a href="#Expansion">Expansion</a>
|
|
|
873 |
<td>
|
|
|
874 |
<td>normal, condensed, etc.
|
|
|
875 |
</table></blockquote>
|
|
|
876 |
|
|
|
877 |
<p>
|
|
|
878 |
Since a font can have multiple variants (for example, Lucida Regular Sans
|
|
|
879 |
Typewriter Italic) we allocate three letters to that; if a font has four
|
|
|
880 |
variants, you're on your own. If a font does have multiple variants, it's
|
|
|
881 |
best to add the expansion letter "<b><tt>r</tt></b>" to make clear which
|
|
|
882 |
letters are variants and which the expansion. This scheme is very close to
|
|
|
883 |
the one proposed in "Filenames for fonts", published in the first 1990
|
|
|
884 |
issue of <em>TUGboat</em> (the journal of the TeX Users Group).
|
|
|
885 |
|
|
|
886 |
<h3><a name="Codes"></a>Codes used to make font file names</h3>
|
|
|
887 |
|
|
|
888 |
<p>
|
|
|
889 |
In the following tables we make no attempt to be exhaustive: instead we
|
|
|
890 |
have simply allocated entries for those things that we needed for the fonts
|
|
|
891 |
that we are actually distributing.
|
|
|
892 |
|
|
|
893 |
<p>
|
|
|
894 |
<a name="Foundries"></a>
|
|
|
895 |
<blockquote><table cellpadding=0 cellspacing=0>
|
|
|
896 |
<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Font foundry codes</font><hr>
|
|
|
897 |
<tr> <th>ID
|
|
|
898 |
<th>
|
|
|
899 |
<th align=left>Foundry
|
|
|
900 |
<tr> <td colspan=3><hr>
|
|
|
901 |
<tr> <td><tt><b>b</b></tt>
|
|
|
902 |
<td>
|
|
|
903 |
<td>Bitstream
|
|
|
904 |
<tr> <td><tt><b>f</b></tt>
|
|
|
905 |
<td>
|
|
|
906 |
<td>Freely distributable and public-domain
|
|
|
907 |
<tr> <td><tt><b>hr</b></tt>
|
|
|
908 |
<td>
|
|
|
909 |
<td>Hershey
|
|
|
910 |
<tr> <td><tt><b>n</b></tt>
|
|
|
911 |
<td>
|
|
|
912 |
<td>IBM
|
|
|
913 |
<tr> <td><tt><b>p</b></tt>
|
|
|
914 |
<td>
|
|
|
915 |
<td>Adobe ("p" for PostScript)
|
|
|
916 |
<tr> <td><tt><b>u</b></tt>
|
|
|
917 |
<td>
|
|
|
918 |
<td>URW[++]
|
|
|
919 |
</table></blockquote>
|
|
|
920 |
|
|
|
921 |
<p>
|
|
|
922 |
<a name="Typeface"></a>
|
|
|
923 |
<blockquote><table cellpadding=0 cellspacing=0>
|
|
|
924 |
<tr><th colspan=7 bgcolor="#CCCC00"><hr><font size="+1">Typeface codes</font><hr>
|
|
|
925 |
<tr valign=bottom> <th>ID
|
|
|
926 |
<td>
|
|
|
927 |
<th align=left>Name
|
|
|
928 |
<td>
|
|
|
929 |
<th align=left>Filename<br>prefix
|
|
|
930 |
<td>
|
|
|
931 |
<th align=left>Source
|
|
|
932 |
<tr> <td colspan=7><hr>
|
|
|
933 |
<tr> <td><tt><b>08</b></tt>
|
|
|
934 |
<td>
|
|
|
935 |
<td>Avant Garde
|
|
|
936 |
<td>
|
|
|
937 |
<td><tt><b>pag</b></tt>
|
|
|
938 |
<td>
|
|
|
939 |
<td>Adobe
|
|
|
940 |
<tr> <td><tt><b>11</b></tt>
|
|
|
941 |
<td>
|
|
|
942 |
<td>Bookman
|
|
|
943 |
<td>
|
|
|
944 |
<td><tt><b>pbk</b></tt>
|
|
|
945 |
<td>
|
|
|
946 |
<td>Adobe
|
|
|
947 |
<tr> <td><tt><b>01</b></tt>
|
|
|
948 |
<td>
|
|
|
949 |
<td>CharterBT
|
|
|
950 |
<td>
|
|
|
951 |
<td><tt><b>bch</b></tt>
|
|
|
952 |
<td>
|
|
|
953 |
<td>Bitstream
|
|
|
954 |
<tr> <td><tt><b>02</b></tt>
|
|
|
955 |
<td>
|
|
|
956 |
<td>Courier
|
|
|
957 |
<td>
|
|
|
958 |
<td><tt><b>ncr</b></tt>
|
|
|
959 |
<td>
|
|
|
960 |
<td>IBM
|
|
|
961 |
<tr> <td><tt><b>03</b></tt>
|
|
|
962 |
<td>
|
|
|
963 |
<td>Helvetica
|
|
|
964 |
<td>
|
|
|
965 |
<td><tt><b>phv</b></tt>
|
|
|
966 |
<td>
|
|
|
967 |
<td>Adobe
|
|
|
968 |
<tr> <td><tt><b>04</b></tt>
|
|
|
969 |
<td>
|
|
|
970 |
<td>New Century Schoolbook
|
|
|
971 |
<td>
|
|
|
972 |
<td><tt><b>pnc</b></tt>
|
|
|
973 |
<td>
|
|
|
974 |
<td>Adobe
|
|
|
975 |
<tr> <td><tt><b>09</b></tt>
|
|
|
976 |
<td>
|
|
|
977 |
<td>Palatino
|
|
|
978 |
<td>
|
|
|
979 |
<td><tt><b>ppl</b></tt>
|
|
|
980 |
<td>
|
|
|
981 |
<td>Adobe
|
|
|
982 |
<tr> <td><tt><b>05</b></tt>
|
|
|
983 |
<td>
|
|
|
984 |
<td>Symbol
|
|
|
985 |
<td>
|
|
|
986 |
<td><tt><b>psy</b></tt>
|
|
|
987 |
<td>
|
|
|
988 |
<td>Adobe
|
|
|
989 |
<tr> <td><tt><b>06</b></tt>
|
|
|
990 |
<td>
|
|
|
991 |
<td>Times
|
|
|
992 |
<td>
|
|
|
993 |
<td><tt><b>ptm</b></tt>
|
|
|
994 |
<td>
|
|
|
995 |
<td>Adobe
|
|
|
996 |
<tr> <td>--
|
|
|
997 |
<td>
|
|
|
998 |
<td>Utopia
|
|
|
999 |
<td>
|
|
|
1000 |
<td><tt><b>put</b></tt>
|
|
|
1001 |
<td>
|
|
|
1002 |
<td>Adobe
|
|
|
1003 |
<tr> <td><tt><b>07</b></tt>
|
|
|
1004 |
<td>
|
|
|
1005 |
<td>Zapf Chancery
|
|
|
1006 |
<td>
|
|
|
1007 |
<td><tt><b>zc</b></tt>
|
|
|
1008 |
<td>
|
|
|
1009 |
<td>public domain
|
|
|
1010 |
<tr> <td><tt><b>10</b></tt>
|
|
|
1011 |
<td>
|
|
|
1012 |
<td>Zapf Dingbats
|
|
|
1013 |
<td>
|
|
|
1014 |
<td><tt><b>pzd</b></tt>
|
|
|
1015 |
<td>
|
|
|
1016 |
<td>Adobe
|
|
|
1017 |
<tr> <td><tt><b>12</b></tt>
|
|
|
1018 |
<td>
|
|
|
1019 |
<td>public domain Cyrillic
|
|
|
1020 |
<td>
|
|
|
1021 |
<td><tt><b>fcy</b></tt>
|
|
|
1022 |
<td>
|
|
|
1023 |
<td>public domain
|
|
|
1024 |
<tr> <td><tt><b>13</b></tt>
|
|
|
1025 |
<td>
|
|
|
1026 |
<td>Kevin Hartig Hiragana
|
|
|
1027 |
<td>
|
|
|
1028 |
<td><tt><b>fhi</b></tt>
|
|
|
1029 |
<td>
|
|
|
1030 |
<td>shareware
|
|
|
1031 |
<tr> <td><tt><b>14</b></tt>
|
|
|
1032 |
<td>
|
|
|
1033 |
<td>Kevin Hartig Katakana
|
|
|
1034 |
<td>
|
|
|
1035 |
<td><tt><b>fka</b></tt>
|
|
|
1036 |
<td>
|
|
|
1037 |
<td>shareware
|
|
|
1038 |
<tr> <td><tt><b>90</b></tt>
|
|
|
1039 |
<td>
|
|
|
1040 |
<td>Hershey Gothic English
|
|
|
1041 |
<td>
|
|
|
1042 |
<td><tt><b>hrge</b></tt>
|
|
|
1043 |
<td>
|
|
|
1044 |
<td>freeware
|
|
|
1045 |
<tr> <td><tt><b>91</b></tt>
|
|
|
1046 |
<td>
|
|
|
1047 |
<td>Hershey Gothic Italian
|
|
|
1048 |
<td>
|
|
|
1049 |
<td><tt><b>hrit</b></tt>
|
|
|
1050 |
<td>
|
|
|
1051 |
<td>freeware
|
|
|
1052 |
<tr> <td><tt><b>92</b></tt>
|
|
|
1053 |
<td>
|
|
|
1054 |
<td>Hershey Gothic German
|
|
|
1055 |
<td>
|
|
|
1056 |
<td><tt><b>hrgr</b></tt>
|
|
|
1057 |
<td>
|
|
|
1058 |
<td>freeware
|
|
|
1059 |
<tr> <td><tt><b>93</b></tt>
|
|
|
1060 |
<td>
|
|
|
1061 |
<td>Hershey Greek
|
|
|
1062 |
<td>
|
|
|
1063 |
<td><tt><b>hrgk</b></tt>
|
|
|
1064 |
<td>
|
|
|
1065 |
<td>freeware
|
|
|
1066 |
<tr> <td><tt><b>94</b></tt>
|
|
|
1067 |
<td>
|
|
|
1068 |
<td>Hershey Plain
|
|
|
1069 |
<td>
|
|
|
1070 |
<td><tt><b>hrpl</b></tt>
|
|
|
1071 |
<td>
|
|
|
1072 |
<td>freeware
|
|
|
1073 |
<tr> <td><tt><b>95</b></tt>
|
|
|
1074 |
<td>
|
|
|
1075 |
<td>Hershey Script
|
|
|
1076 |
<td>
|
|
|
1077 |
<td><tt><b>hrsc</b></tt>
|
|
|
1078 |
<td>
|
|
|
1079 |
<td>freeware
|
|
|
1080 |
<tr> <td><tt><b>96</b></tt>
|
|
|
1081 |
<td>
|
|
|
1082 |
<td>Hershey Symbol
|
|
|
1083 |
<td>
|
|
|
1084 |
<td><tt><b>hrsy</b></tt>
|
|
|
1085 |
<td>
|
|
|
1086 |
<td>freeware
|
|
|
1087 |
</table></blockquote>
|
|
|
1088 |
|
|
|
1089 |
<p>
|
|
|
1090 |
<a name="Weight"></a>
|
|
|
1091 |
<blockquote><table cellpadding=0 cellspacing=0>
|
|
|
1092 |
<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Font weight codes</font><hr>
|
|
|
1093 |
<tr> <th>ID
|
|
|
1094 |
<td>
|
|
|
1095 |
<th align=left>Type
|
|
|
1096 |
<td>
|
|
|
1097 |
<th align=left>Filename
|
|
|
1098 |
<tr> <td colspan=5><hr>
|
|
|
1099 |
<tr> <td><tt><b>0</b></tt>
|
|
|
1100 |
<td>
|
|
|
1101 |
<td>normal
|
|
|
1102 |
<td>
|
|
|
1103 |
<td><tt><b>r</b></tt>
|
|
|
1104 |
<tr> <td><tt><b>1</b></tt>
|
|
|
1105 |
<td>
|
|
|
1106 |
<td>bold
|
|
|
1107 |
<td>
|
|
|
1108 |
<td><tt><b>b</b></tt>
|
|
|
1109 |
<tr> <td><tt><b>2</b></tt>
|
|
|
1110 |
<td>
|
|
|
1111 |
<td>book
|
|
|
1112 |
<td>
|
|
|
1113 |
<td><tt><b>k</b></tt>
|
|
|
1114 |
<tr> <td><tt><b>3</b></tt>
|
|
|
1115 |
<td>
|
|
|
1116 |
<td>demi
|
|
|
1117 |
<td>
|
|
|
1118 |
<td><tt><b>d</b></tt>
|
|
|
1119 |
<tr> <td><tt><b>4</b></tt>
|
|
|
1120 |
<td>
|
|
|
1121 |
<td>light
|
|
|
1122 |
<td>
|
|
|
1123 |
<td><tt><b>l</b></tt>
|
|
|
1124 |
<tr> <td>
|
|
|
1125 |
<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1"><a name="Variant"></a>Font variants</font><hr>
|
|
|
1126 |
<tr> <th>ID
|
|
|
1127 |
<td>
|
|
|
1128 |
<th align=left>Type
|
|
|
1129 |
<td>
|
|
|
1130 |
<th align=left>Filename
|
|
|
1131 |
<tr> <td colspan=5><hr>
|
|
|
1132 |
<tr> <td><tt><b>0</b></tt>
|
|
|
1133 |
<td>
|
|
|
1134 |
<td>normal
|
|
|
1135 |
<td>
|
|
|
1136 |
<td><tt><b>r</b></tt> (omitted when weight is normal)
|
|
|
1137 |
<tr> <td><tt><b>1</b></tt>
|
|
|
1138 |
<td>
|
|
|
1139 |
<td>italic
|
|
|
1140 |
<td>
|
|
|
1141 |
<td><tt><b>i</b></tt>
|
|
|
1142 |
<tr> <td><tt><b>2</b></tt>
|
|
|
1143 |
<td>
|
|
|
1144 |
<td>oblique
|
|
|
1145 |
<td>
|
|
|
1146 |
<td><tt><b>o</b></tt>
|
|
|
1147 |
<tr valign=top> <td><tt><b>3</b></tt>
|
|
|
1148 |
<td>
|
|
|
1149 |
<td>script, handwritten, swash
|
|
|
1150 |
<td>
|
|
|
1151 |
<td><tt><b>w</b></tt>
|
|
|
1152 |
<tr> <td>
|
|
|
1153 |
<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1"><a name="Expansion"></a>Expansion</font><hr>
|
|
|
1154 |
<tr> <th>ID
|
|
|
1155 |
<td>
|
|
|
1156 |
<th align=left>Type
|
|
|
1157 |
<td>
|
|
|
1158 |
<th align=left>Filename
|
|
|
1159 |
<tr> <td colspan=5><hr>
|
|
|
1160 |
<tr> <td><tt><b>0</b></tt>
|
|
|
1161 |
<td>
|
|
|
1162 |
<td>normal
|
|
|
1163 |
<td>
|
|
|
1164 |
<td><tt><b>r</b></tt> (omitted when weight and variant are normal)
|
|
|
1165 |
<tr> <td><tt><b>1</b></tt>
|
|
|
1166 |
<td>
|
|
|
1167 |
<td>narrow
|
|
|
1168 |
<td>
|
|
|
1169 |
<td><tt><b>n</b></tt>
|
|
|
1170 |
</table></blockquote>
|
|
|
1171 |
|
|
|
1172 |
<hr>
|
|
|
1173 |
|
|
|
1174 |
<h2><a name="Use_gs_fonts_with_X"></a>Using Ghostscript fonts on X Windows displays</h2>
|
|
|
1175 |
|
|
|
1176 |
<p>
|
|
|
1177 |
The standard X11 distribution can display various kinds of fonts, including
|
|
|
1178 |
the Adobe Type 1 format, so font files distributed with Ghostscript can be
|
|
|
1179 |
used on X Windows displays. Beginning with Ghostscript version 6.0, the
|
|
|
1180 |
font archive contains the directory files needed to map Ghostscript's font
|
|
|
1181 |
files to XLFDs. Those files are named "<b><tt>fonts.dir</tt></b>" and
|
|
|
1182 |
"<b><tt>fonts.scale</tt></b>". There are two main methods to configure
|
|
|
1183 |
your display to use these files.
|
|
|
1184 |
|
|
|
1185 |
<ul>
|
|
|
1186 |
<li><a href="#Using_xset">With <b><tt>xset</tt></b></a> any user can add a
|
|
|
1187 |
new directory to the font search path for the duration of a session.
|
|
|
1188 |
<li>An administrator with root access can <a
|
|
|
1189 |
href="#Font_permanent_installation">add the Ghostscript font directory
|
|
|
1190 |
permanently</a> to the <a href="#X_font_catalog">X font server's
|
|
|
1191 |
catalog</a> or to an <a href="#Xfree86_fontpath">X display server's list of
|
|
|
1192 |
directories</a>.
|
|
|
1193 |
</ul>
|
|
|
1194 |
|
|
|
1195 |
<h3><a name="Using_xset"></a>Using <b><tt>xset</tt></b></h3>
|
|
|
1196 |
|
|
|
1197 |
<p>
|
|
|
1198 |
Users without root access can add the Ghostscript font directories to the
|
|
|
1199 |
font search path using <b><tt>xset</tt></b>. Such a setting is transient
|
|
|
1200 |
and must be repeated each time the display server is reset or restarted,
|
|
|
1201 |
typically at login, so the call to <b><tt>xset</tt></b> should be added to
|
|
|
1202 |
the user's "<b><tt>.xsession</tt></b>" or "<b><tt>.xinitrc</tt></b>"
|
|
|
1203 |
startup script to make the fonts available at each login.
|
|
|
1204 |
|
|
|
1205 |
<p>
|
|
|
1206 |
To add a new font directory, invoke <b><tt>xset</tt></b> like this:
|
|
|
1207 |
|
|
|
1208 |
<blockquote>
|
|
|
1209 |
<b><tt>xset fp+</tt> <em>{directory}</em></b>
|
|
|
1210 |
</blockquote>
|
|
|
1211 |
|
|
|
1212 |
<p>
|
|
|
1213 |
where <b><em>{directory}</em></b> is the full pathname to the directory
|
|
|
1214 |
containing the fonts on the host running the X display server. For common
|
|
|
1215 |
Ghostscript installations the path is
|
|
|
1216 |
|
|
|
1217 |
<blockquote>
|
|
|
1218 |
<b><tt>/usr/local/Ghostscript/share/fonts</tt></b>
|
|
|
1219 |
</blockquote>
|
|
|
1220 |
|
|
|
1221 |
<h3><a name="Font_permanent_installation"></a>Permanent installation</h3>
|
|
|
1222 |
|
|
|
1223 |
<p> A system administrator, or anyone with the necessary root privilege,
|
|
|
1224 |
can make Ghostscript's fonts permanently available to the managed X display
|
|
|
1225 |
servers. This setup depends on the servers and the methods used
|
|
|
1226 |
to make the fonts available.
|
|
|
1227 |
|
|
|
1228 |
<h4><a name="Configure_xfs"></a>Configuring the <b><tt>xfs</tt></b> font server</h4>
|
|
|
1229 |
|
|
|
1230 |
<p>
|
|
|
1231 |
An X display server can obtain its font resources from a dedicated X font
|
|
|
1232 |
server. <b><tt>xfs</tt></b> is a prototype font server included in the X
|
|
|
1233 |
Consortium X11 distribution. It is configured with a file located in a
|
|
|
1234 |
directory whose exact location is installation-dependent and could be any
|
|
|
1235 |
of
|
|
|
1236 |
|
|
|
1237 |
<blockquote><b><tt>
|
|
|
1238 |
/usr/lib/X11/fs/config
|
|
|
1239 |
<br>/usr/X11/lib/X11/fs/config
|
|
|
1240 |
<br>/usr/X11R6/lib/X11/fs/config
|
|
|
1241 |
</tt></b></blockquote>
|
|
|
1242 |
|
|
|
1243 |
<p>
|
|
|
1244 |
or some similar name. You can also use <b><tt>xfs</tt></b>'s
|
|
|
1245 |
"<b><tt>-config</tt></b>" command-line option to specify the location of
|
|
|
1246 |
the configuration file.
|
|
|
1247 |
|
|
|
1248 |
<p><a name="X_font_catalog"></a>
|
|
|
1249 |
The configuration file designates a list ("catalog") of directories, each
|
|
|
1250 |
of which contains fonts and a font mapping database (the file
|
|
|
1251 |
"<b><tt>fonts.dir</tt></b>"). This list is specified with the
|
|
|
1252 |
"<b><tt>catalogue=</tt></b>" keyword followed by a list of absolute
|
|
|
1253 |
directory paths separated by commas. To add the Ghostscript directory,
|
|
|
1254 |
include its full name in the catalog list, for example:
|
|
|
1255 |
|
|
|
1256 |
<blockquote><b><tt>
|
|
|
1257 |
catalogue = /usr/local/share/Ghostscript/fonts/,
|
|
|
1258 |
<br>/usr/X11R6/lib/X11/fonts/misc/,
|
|
|
1259 |
<br>/usr/X11R6/lib/X11/fonts/Speedo/,
|
|
|
1260 |
<br>/usr/X11R6/lib/X11/fonts/Type1/,
|
|
|
1261 |
<br>/usr/X11R6/lib/X11/fonts/75dpi/,
|
|
|
1262 |
<br>/usr/X11R6/lib/X11/fonts/100dpi/
|
|
|
1263 |
</tt></b></blockquote>
|
|
|
1264 |
|
|
|
1265 |
<p>
|
|
|
1266 |
The fonts are searched in the order the directories are specified, so an
|
|
|
1267 |
XLFD mapped by the Ghostscript directory could shadow a previous similar
|
|
|
1268 |
description specified in the following directories. Once the file is
|
|
|
1269 |
modified, instruct the font server to reload the configuration file by
|
|
|
1270 |
sending it the USR1 signal:
|
|
|
1271 |
|
|
|
1272 |
<blockquote>
|
|
|
1273 |
<b><tt>kill -HUP</tt> <em>{pid}</em></b>
|
|
|
1274 |
</blockquote>
|
|
|
1275 |
|
|
|
1276 |
<p>
|
|
|
1277 |
where <b><em>{pid}</em></b> is the font server process's numeric process
|
|
|
1278 |
ID, as obtained with the "<b><tt>ps</tt></b>" command. Be sure to check
|
|
|
1279 |
that the server is still alive after signaling it: it is very picky and
|
|
|
1280 |
could decide to shut itself down if something is wrong in the new
|
|
|
1281 |
configuration. If this happens, restart the server by hand and try to
|
|
|
1282 |
figure out from its output what's happening. If the font server dies,
|
|
|
1283 |
display servers using it will experience problems, so be sure to send the
|
|
|
1284 |
signal from the console or from a display not using that font server!
|
|
|
1285 |
|
|
|
1286 |
<h4><a name="Configure_Xfree86"></a>Xfree86 display servers</h4>
|
|
|
1287 |
|
|
|
1288 |
<p><a name="Xfree86_fontpath"></a>
|
|
|
1289 |
With the family of Xfree86 display servers, adding a new font directory
|
|
|
1290 |
permanently requires editing the "<b><tt>/etc/XF86Config</tt></b>" setup
|
|
|
1291 |
file to add a new "<b><tt>FontPath</tt></b>" to the "<b><tt>Files</tt></b>"
|
|
|
1292 |
section:
|
|
|
1293 |
|
|
|
1294 |
<blockquote>
|
|
|
1295 |
<b><tt>Section "Files"
|
|
|
1296 |
<br> RgbPath "/usr/X11R6/lib/X11/rgb"
|
|
|
1297 |
<br> FontPath "/usr/local/share/Ghostscript/fonts"
|
|
|
1298 |
<br> FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
|
|
|
1299 |
<br> FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
|
|
|
1300 |
<br> FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
|
|
|
1301 |
<br> FontPath "/usr/X11R6/lib/X11/fonts/Type1"
|
|
|
1302 |
<br> FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
|
|
|
1303 |
<br>EndSection</tt></b>
|
|
|
1304 |
</blockquote>
|
|
|
1305 |
|
|
|
1306 |
<p>
|
|
|
1307 |
The fonts are searched in the order the directories are specified, so an
|
|
|
1308 |
XLFD mapped by the Ghostscript directory could shadow a previous similar
|
|
|
1309 |
description specified in the following directories. Once this global
|
|
|
1310 |
configuration is edited, the new fonts become available to all Xfree86
|
|
|
1311 |
servers in use on that host. If a server is running, it must be restarted
|
|
|
1312 |
to take effect: just quit the current session in the usual way. If the
|
|
|
1313 |
server is under the control of <b><tt>xdm</tt></b>, you may have to kill
|
|
|
1314 |
it, because it is usually reset only between successive sessions.
|
|
|
1315 |
|
|
|
1316 |
<p>
|
|
|
1317 |
This section by Bertrand Petit
|
|
|
1318 |
<<a href="mailto:eegs@phoe.frmug.org">eegs@phoe.frmug.org</a>>
|
|
|
1319 |
|
|
|
1320 |
<!-- [2.0 end contents] ==================================================== -->
|
|
|
1321 |
|
|
|
1322 |
<!-- [3.0 begin visible trailer] =========================================== -->
|
|
|
1323 |
<hr>
|
|
|
1324 |
|
|
|
1325 |
<p>
|
|
|
1326 |
<small>Copyright © 1996, 1997, 1998, 1999, 2000 Aladdin
|
|
|
1327 |
Enterprises. All rights reserved.</small>
|
|
|
1328 |
|
|
|
1329 |
<p>
|
|
|
1330 |
This software is provided AS-IS with no warranty, either express or
|
|
|
1331 |
implied.
|
|
|
1332 |
|
|
|
1333 |
This software is distributed under license and may not be copied,
|
|
|
1334 |
modified or distributed except as expressly authorized under the terms
|
|
|
1335 |
of the license contained in the file LICENSE in this distribution.
|
|
|
1336 |
|
|
|
1337 |
For more information about licensing, please refer to
|
|
|
1338 |
http://www.ghostscript.com/licensing/. For information on
|
|
|
1339 |
commercial licensing, go to http://www.artifex.com/licensing/ or
|
|
|
1340 |
contact Artifex Software, Inc., 101 Lucas Valley Road #110,
|
|
|
1341 |
San Rafael, CA 94903, U.S.A., +1(415)492-9861.
|
|
|
1342 |
|
|
|
1343 |
<p>
|
|
|
1344 |
<small>Ghostscript version 8.53, 20 October 2005
|
|
|
1345 |
|
|
|
1346 |
<!-- [3.0 end visible trailer] ============================================= -->
|
|
|
1347 |
|
|
|
1348 |
</body>
|
|
|
1349 |
</html>
|