Font rasterization is the process of converting text from a vector description 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—information embedded in the font data that optimizes rendering details for particular character sizes.
Types of rasterization
The simplest form of rasterization is simple line-drawing with no anti-aliasing of any sort. In Microsoft's terminology, this is called bi-level rendering because no intermediate shades are used to draw the glyphs. This form of rendering is also called aliased or "jagged". This is the fastest rendering method in the sense that it requires the least computational effort. However, it has the disadvantage that rendered glyphs may lose definition and become hard to recognize at small sizes. Therefore, many font data files contain hints that help the rasterizer decide where to render pixels for particularly troublesome areas in the glyphs, or sets of hand-tweaked bitmaps to use at specific pixel sizes.Greg Hitchcock "", MSDN blogs, 23 Jun 2009 As prototypical example, all versions of Microsoft Windows prior to Windows 95 only provided this type of built-in rasterizer. A more complicated approach is to use standard anti-aliasing techniques from computer graphics. This can be thought of as determining, for each pixel at the edges of the character, how much of that pixel the character occupies, 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 it is drawn 50% gray. Over-simple application of this procedure can produce blurry glyphs. For example, if the letter includes a vertical line that should be one pixel wide but falls exactly between two pixels, it appears on screen as a two-pixel-wide gray line. This blurriness trades clarity for accuracy. However, modern systems often force lines to fall within integral pixel coordinates, which makes glyphs look sharper, but also makes 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. 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
In modern operating systems, rasterization is normally provided by a shared library common to many applications. Such a shared library may be built into the operating system or the desktop environment, or may be added later. In principle, each application may use a different font rasterization library, but in practice most systems attempt to standardize on a single library. Microsoft Windows has supported subpixel rendering since Windows XP. The Windows XP rasterizer is an example of one that prioritizes clarity; by forcing text into integral coordinate positions, it becomes easier to read on the screen, but may appear somewhat different when printed. This has changed with Direct2D/DirectWrite shipping on Windows 7 and Windows Vista platform update. 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 to appear closer to the type designer's intent. The result is that the on-screen displaylooks extremely similar to printed output, but can occasionally be difficult to read at smaller point sizes. 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.