The Full Wiki

More info on Font rasterization

Font rasterization: Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


From Wikipedia, the free encyclopedia

Font rasterization is the process of converting text from a vector description (as found in scalable fonts such as TrueType fonts) to a raster or bitmap description. This often involves some anti-aliasing on screen text to make it smoother and easier to read. It may also involve "hinting", that is, the use of information precomputed for a particular font size.

Types of rasterization

Aliasing, greyscale anti-aliasing and ClearType anti-aliasing
Simple rasterization without antialiasing
Rasterization with antialiasing without hinting
Rasterization with antialiasing with hinting. Here pixels are forced to fall into integral pixel coordinates whenever possible
Rasterization with hinting and subpixel rendering for an RGB flat panel display

In modern operating systems, rasterization is normally provided by a shared library common to many applications. Such a shared library may be built in to the operating system or the desktop environment, or it may be added at some later time. In principle, each application may use a different font rasterization library, but in practice most systems attempt to standardize on a single library.

In older systems and in some embedded systems, fonts are represented as bitmaps pre-drawn at specific sizes. However, most modern systems use fonts represented as mathematical primitives, allowing arbitrary scalability.

The simplest form of rasterization is simple line-drawing with no antialiasing of any sort. This is the fastest method (that is, it requires the least computation to place on screen). This approach has the disadvantage that glyphs may lose their definition when rendered at small sizes. Therefore, many fonts contain "hints" which aid the system's rasterizer in deciding where to render pixels for particularly troublesome areas in the glyphs, or sets of hand-tweaked bitmaps to be used at specific pixel sizes.

Detail of subpixel rendering, showing positions of individual color pixels

A more complicated approach is to use standard anti-aliasing techniques from computer graphics. This can be thought of as determining, for each pixel, how much of that pixel is occupied by the letter, and drawing that pixel with that degree of opacity. For example, when drawing a black letter on a white background, if a pixel ideally should be half filled (perhaps by a diagonal line from corner to corner) it would be drawn in 50% gray. Simple application of this procedure can lead to somewhat blurry glyphs: for example, if the letter includes a vertical line which should be one pixel wide but falls exactly between two pixels, it will appear on screen as a two-pixel-wide gray line. This blurriness is a tradeoff of clarity for accuracy. However, modern systems often force lines to fall within integral pixel coordinates, which makes the glyphs look sharper, but also makes the lines slightly wider or thinner than they would have looked on a printed sheet of paper.

Most computer displays have pixels made up of multiple subpixels (typically one each for red, green, and blue, which are combined to produce the full range of colours). In some cases, particularly with flat panel displays, it is possible to exploit this by rendering at the subpixel resolution rather than using whole pixels, which can increase the effective resolution of the screen. This is generally known as subpixel rendering. One proprietary implementation of subpixel rendering is Microsoft's ClearType.

Currently used rasterization systems

Windows since Windows 98 has included a combination of font-level hinting and antialiasing. Font smoothing is also available as an installation file, released in 1997 for Windows 95. Since Windows XP, it has also supported subpixel rendering. The Windows rasterizer is an example of one that prioritizes clarity; by forcing text into integral coordinate positions (and not even antialiasing certain fonts at certain sizes), it becomes easier to read on the screen, but may appear somewhat different when printed.

Mac OS X's Quartz is distinguished by the use of floating-point positioning; it does not force glyphs into exact pixel locations, instead using various antialiasing techniques, including subpixel rendering, to position characters and lines more accurately. The result is that the on-screen display looks extremely similar to printed output, but can occasionally be difficult to read at smaller point sizes. A simpler type of font antialiasing was introduced in Mac OS 8.5, in 1998. Apple's technique can be seen on Windows in older versions of Safari for Windows. In more recent versions, however, Apple has switched to using system settings by default.

RISC OS has featured font anti-aliasing since 1990. It uses its own font rendering system which favours accurate shapes over readability, with features such as scaffolding and hinting, sub-pixel positioning and background blending [1].

Most other systems use the FreeType library, which falls somewhere between Microsoft's and Apple's implementations; it supports hinting and anti-aliasing, and optionally performs subpixel rendering. Due to problems with patent licensing, many binary distributions of it do not support hinting non-Free fonts with the same quality as the Windows and OS X rasterizers, although the functionality is present and easily enabled. The Free fonts included with most Linux distributions look better with FreeType's "auto-hinting" mode, which is high-quality and not encumbered by patents.

D-Type Font Engine is an independent, proprietary and portable font rasterization library[2]. It provides anti-aliasing, subpixel precision, automatic hinting, bitmap filtering and other techniques that can improve the appearance and legibility of text on screen. According to the authors, the display quality of D-Type Font Engine can be configured to match or exceed the quality of Windows and Mac OS X font rasterizers while using only non-hinted TrueType, OpenType or Type 1 fonts.[3]




Got something to say? Make a comment.
Your name
Your email address