?? fonts.txt
字號(hào):
Copyright (C) 1990, 1995, 1996 Aladdin Enterprises. All rights reserved.
This file is part of Aladdin Ghostscript.
Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author
or distributor accepts any responsibility for the consequences of using it,
or for whether it serves any particular purpose or works at all, unless he
or she says so in writing. Refer to the Aladdin Ghostscript Free Public
License (the "License") for full details.
Every copy of Aladdin Ghostscript must include a copy of the License,
normally in a plain ASCII text file named PUBLIC. The License grants you
the right to copy, modify and redistribute Aladdin Ghostscript, but only
under certain conditions described in the License. Among other things, the
License requires that the copyright notice and this notice be preserved on
all copies.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This file, fonts.txt, describes the fonts and font facilities supplied
with Ghostscript.
For an overview of Ghostscript and a list of the documentation files, see
README.
About Ghostscript fonts
=======================
Most of the font files supplied with Ghostscript have a .pfb extension; a
few have a .pfa or .gsf extension. Each file defines one (transformable)
font specified in outline form. They are ordinary Type 1 PostScript outline
fonts, and can be given to any PostScript language interpreter. Files with
.pfa or .pfb extension are also compatible with Adobe Type Manager and with
tools that don't include a full PostScript language interpreter; files with
.gsf extension are not compatible with ATM or other tools. Starting with
release 4.0, Ghostscript configurations compiled with the `ttfont' option
can also use TrueType fonts (.ttf), but since Ghostscript's TrueType
rasterizer currently ignores the `hints', the output is not of very good
quality.
The only other font-related file that Ghostscript needs for proper operation
is a file called Fontmap. This file maps font names (such as /Times-Roman)
to font file names (such as n021003l.pfb) or aliases (such as
NimbusNo9L-Regu).
The free fonts supplied with Ghostscript fall into three groups:
- 35 basic PostScript fonts (Times, Helvetica, Courier, Symbol,
etc.) These are commercial-quality Type 1 fonts. See the file
`Fontmap' for the complete list.
- Fonts derived from the public domain Hershey fonts, with
improvements (such as adding accented characters) by Thomas Wolff.
These are quite different from traditional printer or display fonts;
the file `hershey.txt' describes them in more detail.
- A few miscellaneous fonts including Cyrillic and kana fonts.
The 35 basic fonts are normally distributed in a file called
`ghostscript-fonts-std-N.NN.tar.gz', the rest in a file called
`ghostscript-fonts-other-N.NN.fonts.tar.gz'.
The file gs_fonts.ps, which is loaded as part of Ghostscript initialization,
arranges to load fonts on demand using the information from Fontmap. If you
want to preload all of the known fonts, invoke the procedure
loadallfonts
This is not done by default, since the fonts occupy about 50K each and there
are a lot of them.
If you want to try out the fonts, prfont.ps contains code for printing a
sampler. Load this program, by including it in the gs command line or by
invoking
(prfont.ps) run
and then to produce a sampler of a particular font, invoke
/fontName DoFont
e.g.
/Times-Roman DoFont
About the Kanji fonts
---------------------
Mr. Tetsurou Tanaka of the Department of Engineering, University of Tokyo,
has created a set of free Kanji fonts that is freely available on the
Internet for anonymous FTP from moe.ipl.t.u-tokyo.ac.jp:/Font and is
distributed with Ghostscript. Anyone can use these fonts as they are or
with some format translation, and redistribute them without reporting. If
you redistribute them, you must inform the recipient that he can get the
original from the abovementioned FTP site, so that he could get the newest
version later.
The fonts include a README file in Japanese. Here is some English
documentation supplied by Mr. Kiyotaka Sakai, also of the University of
Tokyo.
The following four fonts are different styles of the same characters
(JISX208). These fonts also needs wadalab-sym.tar.Z in common.
wadalab-mincho-0-8.tar.gz
wadalab-mincho-0-12.6.tar.gz
wadalab-gothic-0-13.5.tar.gz
wadalab-maru-0-8.4.tar.gz
And the following two fonts are the other different styles of the same
characters(JISX0212).
wadalab-mincho-1-8.tar.gz
wadalab-maru-1-8.tar.gz
These fonts are postscript(type1) fonts. You can convert them to
Metafont, Type1(PFA) font, TeX font(for japanese TeX), BDF font,
Shotaikurabu font by using wftomf.c, wftopfa.c, wftodm.c, bdfmerge.c
wftovf.c in tools directory.
In order to conform to MS-DOS naming restrictions, we have renamed the
original font files as follows:
Name Original name
---- -------------
got013-5.taz wadalab-gothic-0-13.5.tar.gz
mar08-4.taz wadalab-maru-0-8.4.tar.gz
mar18.taz wadalab-maru-1-8.tar.gz
min012-6.taz wadalab-mincho-0-12.6.tar.gz
min08-4.taz wadalab-mincho-0-8.4.tar.gz
min18.taz wadalab-mincho-1-8.tar.gz
sym-4.taz wadalab-sym.4.tar.gz
Platform fonts
==============
Starting with release 2.6.1, Ghostscript uses whatever font technology is
provided by the system on which it runs, by using the system's API for
displaying text. On MS Windows this may be TrueType, or it may be ATM;
Ghostscript neither knows nor cares.
The PostScript language specifies that fonts are data structures with
particular contents (e.g., they include a bounding box for the font, an
Encoding vector for specifying the character set, etc.), and it is fairly
common for PostScript files to make use of this fact; also, characters can
be used as clipping regions, and can be arbitrarily rotated, skewed,
expanded/condensed, etc. algorithmically. Most of this information is
available in one form or another from the underlying graphics system, but
one crucial piece is not: the actual scalable outlines of the characters,
which Ghostscript needs in order to implement clipping with character
shapes and to implement arbitrarily transformed characters. Consequently,
Ghostscript needs the scalable outlines of any font mentioned
in a document, and will load them from the disk (.PFA, .PFB, or
.GSF file) in the usual way, even if it uses the platform's font
machinery for displaying the characters.
To make matters worse, platforms use different names for their standard
fonts. For example, the Times Roman font, for which PostScript files use
the name "Times-Roman", may be known as "Times-Roman", "Times Roman", "Tms
Rmn", "Times New Roman", or "TimesNewRoman". The name may even be
completely different: the usual Helvetica-equivalent TrueType font is
called "Arial". Now, it is possible to cope with this situation by
introducing aliases in Fontmap, but there are two reasons why the
current Ghostscript release does not do this:
1) Naming in different systems is so unstandardized that there
does not seem to be a small set of alternative names that is likely to
cover most of the situations. All 5 of the above names for Times Roman
have been seen in Windows and OS/2 environments, depending on system
version, TrueType vs. ATM, and other unknown factors.
2) Each alias takes up a substantial amount of space (several
hundred bytes) at run time. If each of the standard 35 fonts has 3
additional aliases, this might amount to 50K of wasted space. This is a
lot on a PC, although running under Windows in enhanced mode, it might not
be a problem.
If you don't seem to be getting nice characters on the screen under MS
Windows, you can try adding aliases to the Fontmap, according to the
documentation found there.
Adding your own fonts
=====================
Ghostscript can use any Type 0, Type 1, Type 3, Type 4, or Type 42 font that
is acceptable to other PostScript language interpreters or to ATM, including
MultiMaster fonts. Starting with release 4.0, Ghostscript can also use
TrueType fonts (if Ghostscript was compiled with the `ttfont' option).
Ghostscript also provides a way to construct a (low-quality) Type 1 font
from a bitmap font in BDF format, which is a popular format in the Unix
world.
If you want to add fonts of your own, you must edit Fontmap to include an
entry for your new font at the end. The format for entries is documented
in the Fontmap file. Since later entries in Fontmap override earlier
entries, any fonts you add will supersede the corresponding fonts supplied
with Ghostscript.
In the PC world, Type 1 fonts are customarily given names ending in .PFA or
.PFB. Ghostscript can use these directly; you just need to make the entry
in Fontmap. If you are going to use a commercial Type 1 font (such as fonts
obtained in conjunction with Adobe Type Manager) with Ghostscript, please
read carefully the license that accompanies the font; Aladdin Enterprises
takes no responsibility for any possible violations of such licenses. The
same applies to TrueType fonts, whose names customarily end in .TTF.
Converting BDF fonts
--------------------
If you want to convert a BDF file to a scalable outline, use the program
bdftops.ps (and invoking shell script bdftops.bat or bdftops). Run the
shell command
bdftops <BDF_file_name> [<AFM_file1_name> ...] <your_gsf_file_name>
<font_name> <uniqueID> [<XUID>] [<encoding_name>]
e.g.,
bdftops pzdr.bdf ZapfDingbats.afm pzdr.gsf
ZapfDingbats 4100000 1000000.1.41
(Obviously, you would enter this all on one line; the example is split so
it will fit on the page.) Then make an entry for the .gsf file in Fontmap
as described above. See the end of this document for more detail.
For developers only
===================
The rest of this document is very unlikely to be of value to ordinary
users.
Contents of fonts
-----------------
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 42 (encapsulated TrueType)
fonts are documented in an Adobe supplement; the TrueType format is
documented in publications available from Apple and Microsoft. Type 4 fonts
are not documented anywhere; they are essentially Type 1 fonts with a
BuildChar or BuildGlyph procedure.
Precompiling fonts
------------------
You can compile any Type 1 font into C and link it into the Ghostscript
executable. (Type 1 fonts include any font whose name ends with .pfa or
.pfb, and it also includes all the Ghostscript .gsf fonts except for the
Hershey fonts.) This doesn't have any effect on rendering speed, but it
eliminates the time for loading the font dynamically, which may make a big
difference in total rendering time, especially for multi-page documents.
(Because of RAM and compiler limitations, you should only use compiled fonts
on MS-DOS systems if you are using a 32-bit compiler such as Watcom C/386 or
djgpp; you will run out of memory if you use compiled fonts with the Borland
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -