Font rasterization
Encyclopedia
Font rasterization is the process of converting text from a vector
Vector graphics
Vector graphics is the use of geometrical primitives such as points, lines, curves, and shapes or polygon, which are all based on mathematical expressions, to represent images in computer graphics...

 description (as found in scalable fonts such as TrueType fonts) to a raster
Raster graphics
In computer graphics, a raster graphics image, or bitmap, is a data structure representing a generally rectangular grid of pixels, or points of color, viewable via a monitor, paper, or other display medium...

 or bitmap
Bitmap
In computer graphics, a bitmap or pixmap is a type of memory organization or image file format used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped array of bits. Now, along with pixmap, it commonly refers to...

 description. This often involves some anti-aliasing
Anti-aliasing
In digital signal processing, spatial anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high-resolution image at a lower resolution...

 on screen text to make it smoother and easier to read. It may also involve "hinting
Font hinting
Font hinting is the use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid. At low screen resolutions, hinting is critical for producing a clear, legible text...

", that is, the use of information precomputed for a particular font size.

Types of rasterization

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
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 or the desktop environment
Desktop environment
In graphical computing, a desktop environment commonly refers to a style of graphical user interface derived from the desktop metaphor that is seen on most modern personal computers. These GUIs help the user in easily accessing, configuring, and modifying many important and frequently accessed...

, 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 bitmap
Bitmap
In computer graphics, a bitmap or pixmap is a type of memory organization or image file format used to store digital images. The term bitmap comes from the computer programming terminology, meaning just a map of bits, a spatially mapped array of bits. Now, along with pixmap, it commonly refers to...

s 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 anti-aliasing 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.

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
Subpixel rendering
Subpixel rendering is a way to increase the apparent resolution of a computer's liquid crystal display or Organic Light Emitting Diode display by rendering pixels to take into account the screen type's physical properties...

. One proprietary implementation of subpixel rendering is Microsoft's ClearType
ClearType
ClearType is a trademark for Microsoft's implementation of subpixel rendering technology. ClearType attempts to improve the appearance of text on certain types of computer display screens by sacrificing color fidelity for additional intensity variation. This trade-off is asserted to work well on...

.

Currently used rasterization systems

Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 has supported subpixel rendering since Windows XP
Windows XP
Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

. 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
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

's Quartz
Quartz (graphics layer)
Quartz specifically refers to a pair of Mac OS X technologies, each part of the Core Graphics framework: Quartz 2D and Quartz Compositor. It includes both a 2D renderer in Core Graphics and the composition engine that sends instructions to the graphics card...

 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
Subpixel rendering
Subpixel rendering is a way to increase the apparent resolution of a computer's liquid crystal display or Organic Light Emitting Diode display by rendering pixels to take into account the screen type's physical properties...

, 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
Safari (web browser)
Safari is a web browser developed by Apple Inc. and included with the Mac OS X and iOS operating systems. First released as a public beta on January 7, 2003 on the company's Mac OS X operating system, it became Apple's default browser beginning with Mac OS X v10.3 "Panther". Safari is also the...

 for Windows. In more recent versions, however, Apple has switched to using system settings by default.

RISC OS
RISC OS
RISC OS is a computer operating system originally developed by Acorn Computers Ltd in Cambridge, England for their range of desktop computers, based on their own ARM architecture. First released in 1987, under the name Arthur, the subsequent iteration was renamed as in 1988...

 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.

PDF documents are usually rendered with Adobe CoolType
CoolType
CoolType is a software technology, designed by Adobe Systems to increase the legibility of text on color LCDs like laptop or TFT monitors, especially to make reading long text, like E-Books, easier...

.

Most other systems use the FreeType
FreeType
FreeType is a software library written in C that implements a font rasterization engine. It is used to render text on to bitmaps and provides support for other font-related operations.-Details:...

library, which falls somewhere between Microsoft's and Apple's implementations; it supports hinting and anti-aliasing, and optionally performs subpixel rendering. 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. 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.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK