<!doctype html> <html> <head> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-54391264-2"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-54391264-2'); </script> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet"> <link rel="shortcut icon" type="image/png" href="../../images/favicon.png"> <title>Fonts and Font Facilities Supplied with Ghostscript</title> <!-- Originally: fonts.txt --> <link href="style.css" rel="stylesheet" type="text/css"> <link href="gs-style.css" rel="stylesheet" type="text/css"> </head> <body> <div class="header"> <div class="row"> <div class="col-lt-6 logo"><a href="https://www.ghostscript.com/"><img src="images/ghostscript_logo.png" width="108" height="119" alt=""></a></div> <div class="col-6"><div class="row"><div class="artifexlogo"><a href="https://artifex.com" target="_blank"><img src="images/Artifex_logo.png" width="194" height="40" alt=""></a></div> <div class="col-12"><div class="button button1"><a href="https://artifex.com/contact-us/" title="Contact Us" target="_blank">Contact Us</a></div> <div class="button button2 hidden-xs"><a href="https://www.ghostscript.com/download.html" title="Download">Download</a></div></div></div> </div> </div> </div> <div class="banner"> <div class="row"> <div class="col-12">Fonts and Font Facilities Supplied with Ghostscript</div> </div> </div> <div class="main"> <div class="row"> <div id="sidebar"> <div class="sidebar-item"></div> <div class="col-2 leftnav"> <ul> <li><a href="https://www.ghostscript.com/">Home</a></li> <li><a href="https://www.ghostscript.com/license.html">Licensing</a></li> <li><a href="https://www.ghostscript.com/releases.html">Releases</a></li> <li><a href="https://www.ghostscript.com/release_history.html">Release History</a></li> <li><a href="https://www.ghostscript.com/documentation.html" title="Documentation">Documentation</a></li> <li><a href="https://www.ghostscript.com/download.html" title="Download">Download</a></li> <li><a href="https://www.ghostscript.com/performance.html" title="Performance">Performance</a></li> <li><a href="http://jbig2dec.com/" title="jbig2dec">jbig2dec</a></li> <li><a href="http://git.ghostscript.com/?p=ghostpdl.git;a=summary">Source</a></li> <li><a href="http://bugs.ghostscript.com/">Bugs</a></li> <li><a href="https://www.ghostscript.com/faq.html" title="FAQ">FAQ</a></li> </ul> </div> </div> <div class="col-10 page"> <!--START EDITING HERE--> <h2>Table of contents</h2> <blockquote><ul> <li><a href="#About">About Ghostscript fonts</a></li> <li><a href="#Free_fonts">Ghostscript's free fonts</a></li> <li><a href="#Get_fonts">How Ghostscript gets fonts when it runs</a></li> <li><a href="#Platform_fonts">Platform fonts</a></li> <li><a href="#Add_fonts">Adding your own fonts</a></li> <ul> <li><a href="#Convert_BDF">Converting BDF fonts</a></li> </ul> <li><a href="#For_developers">For developers only</a></li> <li><a href="#Use_gs_fonts_with_X">Using Ghostscript fonts on X Windows displays</a></li> <ul> <li><a href="#Using_xset">Using <code>xset</code></a></li> <li><a href="#Font_permanent_installation">Permanent installation</a></li> <ul> <li><a href="#Configure_xfs">Configuring the <code>xfs</code> font server</a></li> <li><a href="#Configure_Xfree86">Xfree86 display servers</a></li> </ul> </ul> </ul></blockquote> <!-- [1.2 end table of contents] =========================================== --> <!-- [1.3 begin hint] ====================================================== --> <p>For other information, see the <a href="Readme.htm">Ghostscript overview</a>.</p> <!-- [1.3 end hint] ======================================================== --> <hr> <!-- [1.0 end visible header] ============================================== --> <!-- [2.0 begin contents] ================================================== --> <h2><a name="About"></a>About Ghostscript fonts</h2> <p> Ghostscript is distributed with two kinds of files related to fonts:</p> <ul> <li>the fonts themselves in individual files, and</li> <li>a file "<code>Fontmap</code>" that defines for Ghostscript which file represents which font.</li> </ul> <p> Additionally, the file <code>cidfmap</code> can be used to create substitutes for CIDFonts referenced by name in Postscript and PDF jobs. See the section on <a href="Use.htm#CIDFontSubstitution">CID Font Substitution</a> for details. NOTE: care must be exercised since poor or incorrect output may result from inappropriate CIDFont substitution. We therefore <strong>strongly</strong> recommend embedding CIDFonts in your Postscript and PDF files if at all possible.</p> <p> The "base 35" fonts required for Postscript (and "base 14" required for PDF) are Postscript Type 1 font files.</p> <p><a name="Fontmap"></a> When Ghostscript needs a font, it must have some way to know where to look for it: that's the purpose of the <code>Fontmap</code> file, which associates the names of <em>fonts</em> such as <code>/Times-Roman</code> with the names of font <em>files</em>, such as <code>n021003l.pfb</code>. <code>Fontmap</code> can also create aliases for font names, so that for instance, <code>/NimbusNo9L-Regu</code> means the same font as <code>/Times-Roman</code>.</p> <hr> <h2><a name="Free_fonts"></a>Ghostscript's free fonts</h2> <ul> <li>35 commercial-quality Type 1 basic PostScript fonts -- Times, Helvetica, Courier, Symbol, etc. -- contributed by URW++ Design and Development Incorporated, of Hamburg, Germany (<a href="http://www.urwpp.de/">http://www.urwpp.de/</a>). Fontmap names them all.</li> </ul> <hr> <h2><a name="Get_fonts"></a>How Ghostscript gets fonts when it runs</h2> <p> Fonts occupy about 50KB each, so Ghostscript doesn't load them all automatically when it runs. Instead, as part of normal initialization Ghostscript runs a file <code>gs_fonts.ps</code>, which arranges to load fonts on demand using information from the font map. To preload all of the known fonts, invoke the procedure</p> <blockquote><code> loadallfonts </code></blockquote> <p> The file <code>lib/prfont.ps</code> contains code to print a sample page of a font. Load this program by including it in the <code>gs</code> command line or by invoking</p> <blockquote><code> (prfont.ps) run </code></blockquote> <p> Then to produce a sampler of a particular font XYZ, invoke</p> <blockquote><code> /XYZ DoFont </code></blockquote> <p>For example,</p> <blockquote><code> /Times-Roman DoFont </code></blockquote> <p> For more information about how Ghostscript loads fonts during execution, see <a href="Use.htm#Font_lookup">here</a>.</p> <hr> <h2><a name="Add_fonts"></a>Adding your own fonts</h2> <p> Ghostscript can use any Type 0, 1, 3, 4, or 42 font acceptable to other PostScript language interpreters or to ATM, including MultiMaster fonts. Ghostscript can also use TrueType font files.</p> <p> To add fonts of your own, you must edit Fontmap to include at the end an entry for your new font; the format for entries is documented in Fontmap itself. Since later entries in Fontmap override earlier entries, a font you add at the end supersedes any corresponding fonts supplied with Ghostscript and defined earlier in the file. To ensure correct output, it is vital that entries for the "base 35" fonts remain intact in the Fontmap file.</p> <p> In the PC world, Type 1 fonts are customarily given names ending in <code>.PFA</code> or <code>.PFB</code>. Ghostscript can use these directly: you just need to make the entry in Fontmap. If you want to use with Ghostscript a commercial Type 1 font (such as fonts obtained in conjunction with Adobe Type Manager), please read carefully the license that accompanies the font to satisfy yourself that you may do so legally; we take no responsibility for any possible violations of such licenses. The same applies to TrueType fonts.</p> <h3><a name="Convert_BDF"></a>Converting BDF fonts (- deprecated!)</h3> <p> Ghostscript provides a way to construct a (low-quality) Type 1 font from a bitmap font in the BDF format popular in the Unix world. The shell script <code>bdftops</code> (Unix) or the command file <code>bdftops.bat</code> (DOS) converts a BDF file to a scalable outline using <code>bdftops.ps</code> . Run the shell command</p> <blockquote><code> bdftops BDF_filename [AFM_file1_name ...] gsf_filename fontname<br> UniqueID [XUID] [encodingname] </code></blockquote> <p> The arguments have these meanings:</p> <blockquote><table> <tr valign="top"> <td><code>BDF_filename</code></td> <td> </td> <td>Input bitmap file in BDF format</td> <td> </td> <td> </td></tr> <tr valign="top"> <td><code>AFM_file1_name</code></td> <td> </td> <td>AFM files giving metrics</td> <td> </td> <td>(Optional)</td></tr> <tr valign="top"> <td><code>gsf_filename</code></td> <td> </td> <td>Output file</td> <td> </td> <td> </td></tr> <tr valign="top"> <td><code>fontname</code></td> <td> </td> <td>Name of the font</td> <td> </td> <td> </td></tr> <tr valign="top"> <td><code>UniqueID</code></td> <td> </td> <td>UniqueID (<a href="#Unique_IDs">as described below</a>)</td> <td> </td> <td> </td></tr> <tr valign="top"> <td><code>XUID</code></td> <td> </td> <td>XUID, in the form <code>n1.n2.n3...</code> (<a href="#Unique_IDs">as described below</a>)</td> <td> </td> <td>(Optional)</td></tr> <tr valign="top"> <td><code>encodingname</code></td> <td> </td> <td>"StandardEncoding" (the default), "ISOLatin1Encoding",<br>"SymbolEncoding", "DingbatsEncoding"</td> <td> </td> <td>(Optional)</td></tr> </table></blockquote> <p> For instance</p> <blockquote><code> bdftops pzdr.bdf ZapfDingbats.afm pzdr.gsf ZapfDingbats 4100000 1000000.1.41 </code></blockquote> <p> Then make an entry in Fontmap for the <code>.gsf</code> file (<code>pzdr.gsf</code> in the example) as <a href="#Add_fonts">described above</a>.</p> <hr> <h2><a name="For_developers"></a>For developers only</h2> <p> The rest of this document is very unlikely to be of value to ordinary users.</p> <h3><a name="Font_contents"></a>Contents of fonts</h3> <p> As noted above, Ghostscript accepts fonts in the same formats as PostScript interpreters. Type 0, 1, and 3 fonts are documented in the PostScript Language Reference Manual (Second Edition); detailed documentation for Type 1 fonts appears in a separate Adobe book. Type 2 (compressed format) fonts are documented in separate Adobe publications. Type 4 fonts are not documented anywhere; they are essentially Type 1 fonts with a BuildChar or BuildGlyph procedure. Types 9, 10, and 11 (CIDFontType 0, 1, and 2) and Type 32 (downloaded bitmap) fonts are documented in Adobe supplements. Type 42 (encapsulated TrueType) fonts are documented in an Adobe supplement; the TrueType format is documented in publications available from Apple and Microsoft. Ghostscript does not support Type 14 (Chameleon) fonts, which use a proprietary Adobe format.</p> <h3><a name="Unique_IDs"></a>Font names and unique IDs</h3> <p> If you create your own fonts and will use them only within your own organization, you should use <code>UniqueID</code> values between 4000000 and 4999999.</p> <p> If you plan to distribute fonts, ask Adobe to assign you some UniqueIDs and also an <code>XUID</code> for your organization. Contact</p> <blockquote><address> Unique ID Coordinator<br> Adobe Developers Association<br> Adobe Systems, Inc.<br> 345 Park Avenue<br> San Jose, CA 95110-2704<br> +1-408-536-9000 telephone (ADA)<br> +1-408-536-6883 fax<br> <a href="mailto:fontdev-person@adobe.com">fontdev-person@adobe.com</a><br> </address></blockquote> <p> The XUID is a Level 2 PostScript feature that serves the same function as the UniqueID, but is not limited to a single 24-bit integer. The <code>bdftops</code> program creates XUIDs of the form "<code>[-X- 0 -U-]</code>" where "<code>-X-</code>" is the organization XUID and "<code>-U-</code>" is the UniqueID. (Aladdin Enterprises' organization XUID, which appears in a few places in various font-related files distributed with Ghostscript, is 107; do not use this for your own fonts that you distribute.)</p> <hr> <h2><a name="Use_gs_fonts_with_X"></a>Using Ghostscript fonts on X Windows displays</h2> <p> The "Xfonts" feature is no longer supported.</p> <!-- [2.0 end contents] ==================================================== --> <!-- [3.0 begin visible trailer] =========================================== --> <hr> <p> <small>Copyright © 2000-2018 Artifex Software, Inc. All rights reserved.</small> <p> This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at http://www.artifex.com/ or contact Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, CA 94945, U.S.A., +1(415)492-9861, for further information. <p> <small>Ghostscript version 9.26, 20 November 2018 <!-- [3.0 end visible trailer] ============================================= --> <!--FINISH EDITING HERE--> </div> </div> </div> <div class="footer"> <div class="row"> <div class="col-7 footleft"> <ul> <li><a href="https://artifex.com/contact-us/" target="blank">CONTACT US</a></li> <li><a href="https://artifex.com/about-us/" target="blank">ABOUT</a></li> <li><a href="https://ghostscript.com/security.html">SECURITY</a></li> </ul> </div> <div class="col-1 footcenter"> <ul> <li><a href="https://artifex.com/support/" target="blank">SUPPORT</a></li> <li><a href="https://artifex.com/blog/artifex/" target="blank">BLOG</a></li> <li><a href="https://artifex.com/privacy-policy/" target="blank">PRIVACY</a></li> </ul> </div> <div class="col-ft-3 footright"><img src="images/Artifex_logo.png" width="194" height="40" alt=""/> <br> © Copyright 2018 Artifex Software, Inc. <br> All rights reserved. </div> </div> </div> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="index.js"></script> </body> </html>