TrueType Typography
TrueType and Anti-Aliasing

What is Anti-Aliasing?

First of all, what is aliasing? Aliasing is the well-known effect on computer screens, in fact on all pixel devices, where diagonal and curved lines are displayed as a series of little zigzag horizontal and vertical lines. When the pixels are large, like on computer screens, some kind of remedy is highly desirable.

Anti-aliasing, naturally enough, is the name for techniques designed to reduce or eliminate this effect, by shading the pixels along the borders of graphical elements. A simple theoretical model for anti-aliasing pretends that rendering takes place by averaging the image that would be produced on an infinite-resolution device. But it turns out that this is by no means the best method, and in there are much better "sampling filters" in use.

Anti-aliasing depends on screens that can display many colours; screens managing only 256 colours generally can only good anti-aliasing at the expense of their range of colours. If colour were not involoved the problem would be much simpler, and screens capable of only 16 shades of grey would show notable improvements over pure black and white screens. Colour schemes must deal with a range of shades between any two arbitrary text and background colours.

Overlapping semicircles: the difference between standard and anti-aliased rendering
These images are taken from Corel Xara, a program that anti-aliases scalable (non-bitmap) images to simulate a higher screen resolution.
[Fig. 1]


Magnifications (×3) of Figure 1
[Fig. 2]

Figure 1 shows how anti-aliasing increases the apparent resolution of a device (your screen). In Figure 2 we can see precisely what is happening: analysis of the image at higher resolution shows how pixel shading removes unsightly "steps" and "pimples", and restores missing parts of the image.

Anti-Aliasing and Typography

So we've seen how anti-aliasing works in the general case. With on-screen typography, legibility is at stake, and it has been realized that anti-aliasing can cause screen type to become less legible. We don't fully understand the eye-brain's perception of letters (i.e. reading), but certain adaptations of anti-aliasing have certainly enhanced both the legibility and aesthetics of on-screen type.

IBM's YODA display, developed around 1986, had anti-aliased text. The first personal computer to support anti-aliased type natively was the Acorn Archimedes with its RISC OS operating system.

Microsoft describe, with diagrams, the technique used in Windows 95 font smoothing: "vertical and horizontal strokes are left solid with smoothing only applied to curves, serifs and diagonal problem areas".

Anti-aliased text is often called "grey-scale" text (or gray-scale if you're American).


Gasp! Anti-Aliasing in Windows 95

Windows 95 and NT 4.0 are able to anti-alias text, without upgrading one's applications. (Although "Font Smoothing" was in all beta versions of Windows 95, the release version normally needs the Plus! pack to unlock the feature.) You need to be running a screen mode of more than 256 colours. The system isn't limited to black and white text, but places in-between shaded pixels (5 shades) for all text foreground and background colours.

The 'gasp' table (short for Grid-fitting and Scan-conversion Procedure), introduced with TrueType version 1.65, is a simple addition that can be made to any TrueType font. It controls the size ranges at which anti-aliasing and hinting take place. (It is ignored on systems that do not implement anti-aliasing, such as Windows 3.1 and NT 3.5.) Settings in the 'gasp' table are font-wide, i.e. all glyphs in the font respond to the settings in the same way. Apple plans to support the 'gasp' table in forthcoming OS releases.

  'gasp' version:      0
  numRanges:           3

  gasp Range 0
  rangeMaxPPEM:        8
  rangeGaspBehavior:   0x0002- GASP_DOGRAY

  gasp Range 1
  rangeMaxPPEM:        16
  rangeGaspBehavior:   0x0001- GASP_GRIDFIT

  gasp Range 2
  rangeMaxPPEM:        65535
  rangeGaspBehavior:   0x0003- GASP_GRIDFIT - GASP_DOGRAY

The 'gasp' table from Verdana (output by TTFDUMP)
[Fig. 3]

The 'gasp' data in Figure 3 means: up to 8 ppem anti-alias only; between 9 and 16 ppem hint only; above 16 ppem both hint and anti-alias.

You can download the 'gasp' table hacker, TTFGASP, from kewei.



SmoothType for the Macintosh

SmoothType 2.0.2 is an excellent $10 shareware add-on for the Macintosh, by Greg Landweber. It anti-aliases text in any TrueType font (and Type 1 too if ATM is installed). You get the option between faster 2-bit anti-aliasing (4 shades), and slower 4-bit anti-aliasing (16 shades).

Other references to Anti-Aliased Type


TYPE*chimérique | TrueType Typography | TYPE*links