Go to the previous, next chapter.
This question is not trivial to answer. It's analogous to asking what the difference is between various graphics image file formats. The short, somewhat pragmatic answer, is simply that they are different ways of representing the same ``information'' and some of them will work with your software/printer and others won't.
At one level, there are two major sorts of fonts: bitmapped and outline (scalable). Bitmapped fonts are falling out of fashion as various outline technologies grow in popularity and support.
Bitmapped fonts represent each character as a rectangular grid of pixels. The bitmap for each character indicates precisely what pixels should be on and off. Printing a bitmapped character is simply a matter of blasting the right bits out to the printer. There are a number of disadvantages to this approach. The bitmap represents a particular instance of the character at a particular size and resolution. It is very difficult to change the size, shape, or resolution of a bitmapped character without significant loss of quality in the image. On the other hand, it's easy to do things like shading and filling with bitmapped characters.
Outline fonts represent each character mathematically as a series of lines, curves, and 'hints'. When a character from an outline font is to be printed, it must be 'rasterized' into a bitmap ``on the fly''. PostScript printers, for example, do this in the print engine. If the ``engine'' in the output device cannot do the rasterizing, some front end has to do it first. Many of the disadvantages that are inherent in the bitmapped format are not present in outline fonts at all. Because an outline font is represented mathematically, it can be drawn at any reasonable size. At small sizes, the font renderer is guided by the 'hints' in the font; at very small sizes, particularly on low-resolution output devices such as screens, automatically scaled fonts become unreadable, and hand-tuned bitmaps are a better choice (if they are available). Additionally, because it is rasterized ``on demand,'' the font can be adjusted for different resolutions and 'aspect ratios'.
Werenfried Spit adds the following remark:
Well designed fonts are not scalable. I.e. a well designed 5pt font is not simply its 10pt counterpart 50% scaled down. (One can verify this by blowing up some small print in a copier and compare it with large print; or see the example for computer modern in D.E. Knuth's TeXbook.) Although this fact has no direct implications for any of the two methods of font representation it has an indirect one: users and word processor designers tend to blow up their 10pt fonts to 20pt or scale them down to 5pt given this possibility. Subtle details, but well...
LaserJet .SFP and .SFL files, TeX PK, PXL, and GF files, Macintosh Screen Fonts, and GEM .GFX files are all examples of bitmapped font formats.
PostScript Type 1, Type 3, and Type 5 fonts, Nimbus Q fonts, TrueType fonts, Sun F3, MetaFont .mf files, and LaserJet .SFS files are all examples of outline font formats.
Neither of these lists is even close to being exhaustive.
To complicate the issue further, identical formats on different platforms are not necessarily the same. For example Type 1 fonts on the Macintosh are not directly usable under MS-DOS or Unix, and vice-versa.
It has been pointed out that the following description shows signs of its age (for example, the eexec encryption has been thoroughly hacked). I don't dispute the observation and I encourage anyone with the knowledge and time to submit a more up to date description.
It has further been suggested that this commentary is biased toward Kingsley/ATF. The omission of details about Bitstream (and possibly Bauer) may be considered serious since their software lies inside many 3rd-party PostScript interpreters.
The moderators of this FAQ would gladly accept other descriptions/ explanations/viewpoints on the issues discussed in this (and every other) section.
[Ed Note: Liam R. E. Quin supplied many changes to the following section in an attempt to bring it up to date. Hopefully it is a better reflection of the state of the world today (12/07/92) than it was in earlier FAQs]
Henry Schneiker
((( semi-quote )))
There has been a lot of confusion about font technologies in recent
times, especially when it comes to Type 1 versus Type 3 fonts,
``hints,'' PostScript compatibility, encryption, character
regularizing, kerning, and the like.
All fonts produced with Adobe's font technology are protected through
data encryption. The decryption is provided by the `eexec' (encrypted
execute) PostScript operator and, until recently, was only present in
Adobe's licensed PostScript.
Adobe has published the details of the Type 1 font format in the `Black
Book', Adobe Type 1 Font Format (version 1.1), Adobe Systems Inc., 1990.
The encryption was mainly used because of font copyright problems;
unencrypted fonts can also be used, but these tend to use an efficient
binary encoding, also in documented the Type 1 book, and so are still not
readable PostScript.
There are generally three font formats used in Adobe PostScript
printers: Type 1, Type 3, and Type 5. Type 1 fonts are Adobe's
downloadable format. Type 3 fonts are third-party downloadable
format. Type 5 fonts are the ROM-based fonts that are part of your
printer.
There is no functional difference between a Type 1, Type 3, or Type 5
font. A Type 3 font can do anything a Type 1 or Type 5 font can do.
The only real difference between them is where the `BuildChar'
routine comes from. For Type 1 and Type 5 fonts it's built into the
printer. For Type 3 fonts it's built into the font. In other words,
anything a Type 1 font can do a Type 3 font can also do.
[Ed note: the reverse is not true. Type3 fonts can do things that
Type1 fonts cannot. But they aren't hinted...]
When PostScript is asked to generate a character, PostScript looks in
the font's dictionary for FontType. If FontType is 1 or 5 PostScript
executes an internal routine that knows how to interpret the font
data stored in CharStrings. If FontType is 3 PostScript executes the
routine BuildChar from the font's dictionary to interpret the font
data (often stored in CharStrings).
However, each BuildChar routine is written to read data formatted in
a method convenient to the vendor. Adobe, Altsys, Bitstream, and
Kingsley/ATF all format their font data differently and, hence, have
different BuildChar routines.
[Ed note: relative hard disk efficiency of Kingsley vs. Adobe fonts
deleted on 12/07/92]
Type 5 fonts are special in that they often include hand-tuned
bitmaps for the commonly used sizes, such as 10- and 12-point. Other
sizes are generated from the outlines in normal fashion.
Don't confuse Type 1, Type 3, and Type 5 fonts with Bitstream's Type A,
Type B, Type C, and Type F. They are not the same and serve only to confuse
the issue.
When a character is described in outline format the outline has
unlimited resolution. If you make it ten times as big, it is just as
accurate as if it were ten times as small.
However, to be of use, we must transfer the character outline to a
sheet of paper through a device called a raster image processor
(RIP). The RIP builds the image of the character out of lots of
little squares called picture elements (pixels).
The problem is, a pixel has physical size and can be printed only as
either black or white. Look at a sheet of graph paper. Rows and
columns of little squares (think: pixels). Draw a large `O' in the
middle of the graph paper. Darken in all the squares touched by the
O. Do the darkened squares form a letter that looks like the O you
drew? This is the problem with low resolution (300 dpi). Which pixels
do you turn on and which do you leave off to most accurately
reproduce the character?
All methods of hinting strive to fit (map) the outline of a character
onto the pixel grid and produce the most pleasing/recognizable
character no matter how coarse the grid is.
[Ed note: deleted some paragraphs that are no longer true. Times change...]
Optical Scaling modifies the relative shape of a character to
compensate for the visual effects of changing a character's size. As
a character gets smaller, the relative thickness of strokes, the size
of serifs, the width of the character, the inter-character spacing,
and inter-line spacing should increase. Conversely, as a character
gets larger, the relative thickness, widths, and spacing should
decrease.
Contrast this with linear scaling, in which all parts of a character
get larger or smaller at the same rate, making large characters look
wide and heavy (strokes are too thick, serifs are too big) while
small characters look thin and weak.
As applied to PostScript fonts, kerning refers to kern pairs. A kern
pair specifies two characters (e.g., A and V) and the distance to
move the second character relative to the first. The typical use of a
kern pair is to remove excessive space between a pair of characters.
However, it may also be used to add space.
There are currently several printer manufacturers on the market with
PostScript clones. To be viable, a PostScript clone must comply with
the `red book' (PS Language Reference Manual).
In order to avoid paying royalties to Adobe, and because Adobe's Type 1
font format was originally proprietary, many PostScript interpreters use
some other font format. Sun uses F3, and some other vendors use
Bitstream's Speedo format, for example. The only real problem this causes
is that the widths of characters (the `font metrics') may vary from
Adobe's, so that programs that assume the Adobe character widths will
produce poor quality output. Bitstream fonts used to be particularly bad
in the early days, but they and most or all of the other vendors have
solved those problems.
Apple's new System 7.0 supports a new format of outline font that will
allow high-quality characters of any size to be displayed on the screen.
TrueType stores font outlines as B-spline curves along with programmed
resolution hints. B-spline curves are faster to compute and easier to
manipulate than the Bezier curves used in PostScript.
Adobe is not going to support Apple's new format by converting the
Adobe/Linotype library to B-spline format. There are two reasons for
this: First, there is no support for font encryption (yes, the hooks
are there, but nothing is implemented). Second, Adobe does not want
to dilute PostScript and its font library. However, the Macintosh is
too big a market to simply turn away from. Therefore, Adobe will
provide its Font Manager to display its own fonts on the Mac screen.
Apple ships Adobe's ATM for this purpose.
((( unquote )))