Fonts.htm 44 KB

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