[gs-cvs] rev 8243 - trunk/gs/doc
giles at ghostscript.com
giles at ghostscript.com
Tue Sep 18 10:32:32 PDT 2007
Author: giles
Date: 2007-09-18 10:32:31 -0700 (Tue, 18 Sep 2007)
New Revision: 8243
Modified:
trunk/gs/doc/Fonts.htm
Log:
Remove obsolete font encoding and compilation instructions from the
documentation. Bug 689432.
Modified: trunk/gs/doc/Fonts.htm
===================================================================
--- trunk/gs/doc/Fonts.htm 2007-09-18 15:41:08 UTC (rev 8242)
+++ trunk/gs/doc/Fonts.htm 2007-09-18 17:32:31 UTC (rev 8243)
@@ -39,13 +39,6 @@
<li><a href="#Convert_BDF">Converting BDF fonts</a>
</ul>
<li><a href="#For_developers">For developers only</a>
-<ul>
-<li><a href="#Font_contents">Contents of fonts</a>
-<li><a href="#Precompiling">Precompiling fonts</a>
-<li><a href="#Short_identifiers">Precompiling fonts on platforms with identifier length limits</a>
-<li><a href="#Unique_IDs">Font names and unique IDs</a>
-<li><a href="#Codes">Codes used to make font file names</a>
-</ul>
<li><a href="#Use_gs_fonts_with_X">Using Ghostscript fonts on X Windows displays</a>
<ul>
<li><a href="#Using_xset">Using <b><tt>xset</tt></b></a>
@@ -581,239 +574,14 @@
from Apple and Microsoft. Ghostscript does not support Type 14 (Chameleon)
fonts, which use a proprietary Adobe format.
-<h3><a name="Precompiling"></a>Precompiling fonts</h3>
-
-<p>
-You can precompile -- convert -- any Type 1 font into C, then compile and
-build it into the Ghostscript executable. (Type 1 fonts include any font
-whose name ends with <tt><b>.pfa</b></tt> or
-<tt><b>.pfb</b></tt>, and it also includes all the
-Ghostscript <tt><b>.gsf</b></tt> fonts except the Hershey
-fonts.) This has no effect on rendering speed, but it eliminates the time
-to load the font dynamically, which may make a big improvement in total
-rendering time, especially for multi-page documents. It also reduces the
-number of auxiliary files required at run time. Fonts precompiled and
-built into Ghostscript this way need not appear in Fontmap, although if
-they do appear there, no harm is done.
-
-<p><a name="font2c"></a> The utility for precompiling fonts is named
-<tt><b>font2c</b></tt>. Note that since
-<tt><b>font2c</b></tt> uses the PostScript language program
-<tt><b>font2c.ps</b></tt>, Ghostscript must already be
-available to run it, and Fontmap must contain entries for the fonts you
-want to compile. For example, to precompile the Times-Italic font,
-
-<blockquote><tt><b>
-font2c Times-Italic ptmri.c
-</b></tt></blockquote>
-
-<p>
-The first argument ("<b><tt>Times-Italic</tt></b>" above) is the font's
-name and the second ("<b><tt>ptmri.c</tt></b>") is the name of the
-resulting C file. You can use any file name you want, as long as it ends
-in "<tt><b>.c</b></tt>". It needn't be limited to eight characters unless
-your operating system requires this. If "<b><tt>XYZ.gsf</tt></b>" or
-"<b><tt>XYZ.pfa</tt></b>" is the font file's name in Fontmap,
-"<b><tt>XYZ.c</tt></b>" is a good choice for the C file.
-
-<p>
-Under VMS, or other systems whose the C compilers limit the length of
-identifiers, you must do something slightly more complicated; for that see
-the section on <a href="#Short_identifiers">short identifiers in C</a>. On
-VMS also, you must quote the font name ("{font name}") to preserve the
-name's mixed upper and lower case. For VMS environments in general see
-<a href="Make.htm#VMS">the VMS directions</a> in the documentation on
-building Ghostscript, and ignore the rest of this section.
-
-<p>
-Note that fonts are not supplied with Ghostscript in precompiled form, since
-those files are quite large and can easily be recreated using <a
-href="#font2c"><tt><b>font2c</b></tt></a>. There is a makefile target to
-run <tt><b>font2c</b></tt> on all the fonts supplied with Ghostscript.
-Invoke it with
-
-<blockquote><b><tt>
-make fonts_standard_c
-</tt></b></blockquote>
-
-<p>Besides running <tt><b>font2c</b></tt>, you must compile the fonts and
-link them into the executable. To do this, add the compiled fonts feature
-to your platform-specific makefile. See the
-<a href="Make.htm#Makefile_overview">overview of makefiles</a> in the
-documentation on building Ghostscript for the list of makefiles for each
-platform. Find the definition of the <tt><b>FEATURE_DEVS</b></tt> macro in
-the makefile, which looks something like this:
-
-<blockquote><tt><b>
-FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)pipe.dev
-</b></tt></blockquote>
-
-<p>
-and add "ccfonts.dev":
-
-<blockquote><tt><b>
-FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)pipe.dev $(PSD)ccfonts.dev
-</b></tt></blockquote>
-
-<p>
-Next you must add the specific fonts to <tt><b>int.mak</b></tt>, the
-platform-independent makefile for the interpreter. This makefile already
-has rules for the standard fonts supplied with Ghostscript, so if you just
-want to compile the standard fonts, you needn't do anything else. Now we
-describe how to compile other fonts into the executable, such as the Utopia
-or Kana fonts, or your own fonts.
-
-<p>
-Suppose you want to compile the Kana fonts into the executable. First pick
-one of <b><tt>ccfonts10</tt></b> through <b><tt>ccfonts15</tt></b> as the
-place you will do this, say <b><tt>ccfonts10</tt></b>. Add your compiled
-font file names, for instance
-
-<blockquote><tt><b>
-ccfonts10_=$(CFOBJ)fhirw.$(OBJ)
-</b></tt></blockquote>
-
-<p>
-(Note the underscore "_".) If this makes the line too long, use another
-line of the same form, for instance,
-
-<blockquote><tt><b>
-ccfonts11_=$(CFOBJ)fkarw.$(OBJ)
-</b></tt></blockquote>
-
-<p>
-Just below the <b><tt>ccfonts10_=</tt></b> line is a line
-
-<blockquote><tt><b>
-ccfonts10=
-</b></tt></blockquote>
-
-<p>
-(Note no underscore.) Add your own fonts to the end of this line, replacing
-dashes ("-") with underscores ("_") in the font names. For instance:
-
-<blockquote><tt><b>
-ccfonts10=Calligraphic_Hiragana
-</b></tt></blockquote>
-
-<p>
-Again, if a line becomes too long, add another line of the same form, for
-instance,
-
-<blockquote><tt><b>
-ccfonts10=Calligraphic_Hiragana<br>
-ccfonts11=Calligraphic_Katakana
-</b></tt></blockquote>
-
-<p>
-After all the lines of this form, add a pair of lines to compile each font,
-separating these entries from the "ccfonts*" lines and from each other with
-a blank line. In our example this becomes
-
-<blockquote>
-<pre>$(CFOBJ)fhirw.$(OBJ): $(CFGEN)fhirw.c $(CCFONT)
- $(CFCC) $(CFO_)fhirw.$(OBJ) $(C_) $(CFGEN)fhirw.c
-
-$(CFOBJ)fkarw.$(OBJ): $(CFGEN)fkarw.c $(CCFONT)
- $(CFCC) $(CFO_)fkarw.$(OBJ) $(C_) $(CFGEN)fkarw.c
-</pre></blockquote>
-
-<p>
-Finally, run <tt><b>make</b></tt> to build an executable that includes the
-fonts you added. They are present in <b><tt>FontDirectory</tt></b> when
-Ghostscript starts up.
-
-<h3><a name="Short_identifiers"></a>Precompiling fonts on platforms with identifier length limits</h3>
-
-<p>
-On some platforms the C compiler or linker limits the number of significant
-characters usable in an identifier. On such platforms, you must do a
-little extra work.
-
-<p>
-Let <em><b>N</b></em> be the maximum number of significant characters in an
-identifier (typically 31). For each font whose name is longer than
-<em><b>N</b></em>-5 characters, pick an arbitrary identifier that we will
-call the "short name". This can be any string you want, as long as it
-contains only letters, digits, and underscores; is no longer than
-<em><b>N</b></em>-5 characters; and is different from all other font names
-and short names. A good choice for this is the name of the C file. There
-is no harm in doing this for fonts with names shorter than
-<em><b>N</b></em>-5 characters, but it's unnecessary.
-
-<p>
-You must do two different things for fonts that require a short name.
-
-<ol>
-<li>You must supply the short name as a third argument to
-<tt><b>font2c</b></tt>. For example, to compile
-<b><tt>NewCenturySchlbk-BoldItalic</tt></b> using the short name
-<b><tt>pncbi</tt></b>,
-
-<blockquote><tt><b>
-font2c NewCenturySchlbk-BoldItalic pncbi.c pncbi
-</b></tt></blockquote>
-
-<li>
-Then when you add the font name to the definition of one of the ccfonts*
-macros in the makefile, use the short name, not the actual font name, for
-instance,
-
-<blockquote><table cellpadding=0 cellspacing=0>
-<tr> <td>Use
- <td>
- <td><tt><b>ccfonts12=pncbi</b></tt>
-<tr> <td>Rather than
- <td>
- <td><tt><b>ccfonts12=NewCenturySchlbk_BoldItalic</b></tt>
-</table></blockquote>
-</ol>
-
-<p>
-Everything else is as described above. This procedure doesn't change the
-name of the font in Fontmap or as seen from within Ghostscript; it just
-works around a limitation of some older compilers.
-
-<hr>
-
<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 <tt><b>UniqueID</b></tt> values between
-4000000 and 4999999, coded like this (see the <a href="#Codes">tables of
-codes</a> for font file names below):
+4000000 and 4999999.
-<blockquote><table cellpadding=0 cellspacing=0>
-<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Coding of UniqueID "<tt><b>4TTWVE0</b></tt>"</font><hr>
-<tr> <td><tt><b>TT</b></tt>
- <td>
- <td><a href="#Typeface">Typeface</a>
- <td>
- <td>two-digit identifier
-<tr> <td><tt><b>W</b></tt>
- <td>
- <td><a href="#Weight">Weight</a>
- <td>
- <td>normal, bold, etc.
-<tr> <td><tt><b>V</b></tt>
- <td>
- <td><a href="#Variant">Variant</a>
- <td>
- <td>normal, italic, etc.
-<tr> <td><tt><b>E</b></tt>
- <td>
- <td><a href="#Expansion">Expansion</a>
- <td>
- <td>normal, condensed, etc.
-</table></blockquote>
-
<p>
-This scheme will not work forever: as soon there are more than 99
-typefaces, or more than 9 weights or variants, we will have to do something
-else. But it suffices for the near future.
-
-<p>
If you plan to distribute fonts, ask Adobe to assign you some UniqueIDs and
also an <tt><b>XUID</b></tt> for your organization. Contact
@@ -838,336 +606,6 @@
font-related files distributed with Ghostscript, is 107; do not use this for
your own fonts that you distribute.)
-<p>
-Because Ghostscript runs on many different systems, including DOS, the
-names of font files can be no longer than 8 characters. We therefore
-construct a font's filename <tt><b>FTTWVVVE.gsf</b></tt>
-similarly to the construction for temporary UniqueIDs.
-
-<blockquote><table cellpadding=0 cellspacing=0>
-<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Coding of font file name "<tt><b>FTTWVVVE.gsf</b></tt>"</font><hr>
-<tr> <td><tt><b>F</b></tt>
- <td>
- <td><a href="#Foundries">Foundry</a>
- <td>
- <td>
-<tr> <td><tt><b>TT</b></tt>
- <td>
- <td><a href="#Typeface">Typeface</a>
- <td>
- <td>two-digit identifier
-<tr> <td><tt><b>W</b></tt>
- <td>
- <td><a href="#Weight">Weight</a>
- <td>
- <td>normal, bold, etc.
-<tr> <td><tt><b>V</b></tt>
- <td>
- <td><a href="#Variant">Variant</a>
- <td>
- <td>normal, italic, etc.
-<tr> <td><tt><b>E</b></tt>
- <td>
- <td><a href="#Expansion">Expansion</a>
- <td>
- <td>normal, condensed, etc.
-</table></blockquote>
-
-<p>
-Since a font can have multiple variants (for example, Lucida Regular Sans
-Typewriter Italic) we allocate three letters to that; if a font has four
-variants, you're on your own. If a font does have multiple variants, it's
-best to add the expansion letter "<b><tt>r</tt></b>" to make clear which
-letters are variants and which the expansion. This scheme is very close to
-the one proposed in "Filenames for fonts", published in the first 1990
-issue of <em>TUGboat</em> (the journal of the TeX Users Group).
-
-<h3><a name="Codes"></a>Codes used to make font file names</h3>
-
-<p>
-In the following tables we make no attempt to be exhaustive: instead we
-have simply allocated entries for those things that we needed for the fonts
-that we are actually distributing.
-
-<p>
-<a name="Foundries"></a>
-<blockquote><table cellpadding=0 cellspacing=0>
-<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Font foundry codes</font><hr>
-<tr> <th>ID
- <th>
- <th align=left>Foundry
-<tr> <td colspan=3><hr>
-<tr> <td><tt><b>b</b></tt>
- <td>
- <td>Bitstream
-<tr> <td><tt><b>f</b></tt>
- <td>
- <td>Freely distributable and public-domain
-<tr> <td><tt><b>hr</b></tt>
- <td>
- <td>Hershey
-<tr> <td><tt><b>n</b></tt>
- <td>
- <td>IBM
-<tr> <td><tt><b>p</b></tt>
- <td>
- <td>Adobe ("p" for PostScript)
-<tr> <td><tt><b>u</b></tt>
- <td>
- <td>URW[++]
-</table></blockquote>
-
-<p>
-<a name="Typeface"></a>
-<blockquote><table cellpadding=0 cellspacing=0>
-<tr><th colspan=7 bgcolor="#CCCC00"><hr><font size="+1">Typeface codes</font><hr>
-<tr valign=bottom> <th>ID
- <td>
- <th align=left>Name
- <td>
- <th align=left>Filename<br>prefix
- <td>
- <th align=left>Source
-<tr> <td colspan=7><hr>
-<tr> <td><tt><b>08</b></tt>
- <td>
- <td>Avant Garde
- <td>
- <td><tt><b>pag</b></tt>
- <td>
- <td>Adobe
-<tr> <td><tt><b>11</b></tt>
- <td>
- <td>Bookman
- <td>
- <td><tt><b>pbk</b></tt>
- <td>
- <td>Adobe
-<tr> <td><tt><b>01</b></tt>
- <td>
- <td>CharterBT
- <td>
- <td><tt><b>bch</b></tt>
- <td>
- <td>Bitstream
-<tr> <td><tt><b>02</b></tt>
- <td>
- <td>Courier
- <td>
- <td><tt><b>ncr</b></tt>
- <td>
- <td>IBM
-<tr> <td><tt><b>03</b></tt>
- <td>
- <td>Helvetica
- <td>
- <td><tt><b>phv</b></tt>
- <td>
- <td>Adobe
-<tr> <td><tt><b>04</b></tt>
- <td>
- <td>New Century Schoolbook
- <td>
- <td><tt><b>pnc</b></tt>
- <td>
- <td>Adobe
-<tr> <td><tt><b>09</b></tt>
- <td>
- <td>Palatino
- <td>
- <td><tt><b>ppl</b></tt>
- <td>
- <td>Adobe
-<tr> <td><tt><b>05</b></tt>
- <td>
- <td>Symbol
- <td>
- <td><tt><b>psy</b></tt>
- <td>
- <td>Adobe
-<tr> <td><tt><b>06</b></tt>
- <td>
- <td>Times
- <td>
- <td><tt><b>ptm</b></tt>
- <td>
- <td>Adobe
-<tr> <td>--
- <td>
- <td>Utopia
- <td>
- <td><tt><b>put</b></tt>
- <td>
- <td>Adobe
-<tr> <td><tt><b>07</b></tt>
- <td>
- <td>Zapf Chancery
- <td>
- <td><tt><b>zc</b></tt>
- <td>
- <td>public domain
-<tr> <td><tt><b>10</b></tt>
- <td>
- <td>Zapf Dingbats
- <td>
- <td><tt><b>pzd</b></tt>
- <td>
- <td>Adobe
-<tr> <td><tt><b>12</b></tt>
- <td>
- <td>public domain Cyrillic
- <td>
- <td><tt><b>fcy</b></tt>
- <td>
- <td>public domain
-<tr> <td><tt><b>13</b></tt>
- <td>
- <td>Kevin Hartig Hiragana
- <td>
- <td><tt><b>fhi</b></tt>
- <td>
- <td>shareware
-<tr> <td><tt><b>14</b></tt>
- <td>
- <td>Kevin Hartig Katakana
- <td>
- <td><tt><b>fka</b></tt>
- <td>
- <td>shareware
-<tr> <td><tt><b>90</b></tt>
- <td>
- <td>Hershey Gothic English
- <td>
- <td><tt><b>hrge</b></tt>
- <td>
- <td>freeware
-<tr> <td><tt><b>91</b></tt>
- <td>
- <td>Hershey Gothic Italian
- <td>
- <td><tt><b>hrit</b></tt>
- <td>
- <td>freeware
-<tr> <td><tt><b>92</b></tt>
- <td>
- <td>Hershey Gothic German
- <td>
- <td><tt><b>hrgr</b></tt>
- <td>
- <td>freeware
-<tr> <td><tt><b>93</b></tt>
- <td>
- <td>Hershey Greek
- <td>
- <td><tt><b>hrgk</b></tt>
- <td>
- <td>freeware
-<tr> <td><tt><b>94</b></tt>
- <td>
- <td>Hershey Plain
- <td>
- <td><tt><b>hrpl</b></tt>
- <td>
- <td>freeware
-<tr> <td><tt><b>95</b></tt>
- <td>
- <td>Hershey Script
- <td>
- <td><tt><b>hrsc</b></tt>
- <td>
- <td>freeware
-<tr> <td><tt><b>96</b></tt>
- <td>
- <td>Hershey Symbol
- <td>
- <td><tt><b>hrsy</b></tt>
- <td>
- <td>freeware
-</table></blockquote>
-
-<p>
-<a name="Weight"></a>
-<blockquote><table cellpadding=0 cellspacing=0>
-<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Font weight codes</font><hr>
-<tr> <th>ID
- <td>
- <th align=left>Type
- <td>
- <th align=left>Filename
-<tr> <td colspan=5><hr>
-<tr> <td><tt><b>0</b></tt>
- <td>
- <td>normal
- <td>
- <td><tt><b>r</b></tt>
-<tr> <td><tt><b>1</b></tt>
- <td>
- <td>bold
- <td>
- <td><tt><b>b</b></tt>
-<tr> <td><tt><b>2</b></tt>
- <td>
- <td>book
- <td>
- <td><tt><b>k</b></tt>
-<tr> <td><tt><b>3</b></tt>
- <td>
- <td>demi
- <td>
- <td><tt><b>d</b></tt>
-<tr> <td><tt><b>4</b></tt>
- <td>
- <td>light
- <td>
- <td><tt><b>l</b></tt>
-<tr> <td>
-<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1"><a name="Variant"></a>Font variants</font><hr>
-<tr> <th>ID
- <td>
- <th align=left>Type
- <td>
- <th align=left>Filename
-<tr> <td colspan=5><hr>
-<tr> <td><tt><b>0</b></tt>
- <td>
- <td>normal
- <td>
- <td><tt><b>r</b></tt> (omitted when weight is normal)
-<tr> <td><tt><b>1</b></tt>
- <td>
- <td>italic
- <td>
- <td><tt><b>i</b></tt>
-<tr> <td><tt><b>2</b></tt>
- <td>
- <td>oblique
- <td>
- <td><tt><b>o</b></tt>
-<tr valign=top> <td><tt><b>3</b></tt>
- <td>
- <td>script, handwritten, swash
- <td>
- <td><tt><b>w</b></tt>
-<tr> <td>
-<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1"><a name="Expansion"></a>Expansion</font><hr>
-<tr> <th>ID
- <td>
- <th align=left>Type
- <td>
- <th align=left>Filename
-<tr> <td colspan=5><hr>
-<tr> <td><tt><b>0</b></tt>
- <td>
- <td>normal
- <td>
- <td><tt><b>r</b></tt> (omitted when weight and variant are normal)
-<tr> <td><tt><b>1</b></tt>
- <td>
- <td>narrow
- <td>
- <td><tt><b>n</b></tt>
-</table></blockquote>
-
<hr>
<h2><a name="Use_gs_fonts_with_X"></a>Using Ghostscript fonts on X Windows displays</h2>
More information about the gs-cvs
mailing list