ClearType

Established: November 2, 2001

Text anti-aliasing for LCD screens that produces sharper text by exploiting the sub-pixel geometry.

 

Technical Overview of ClearType Filtering

ClearType is a method for improving the quality of fonts on displays that contain repeating patterns of colored sub-pixels. ClearType has several component technologies. This page describes the filtering used by ClearType during the conversion from an ideal font glyph to intensities of sub-pixels. The filtering is optimal under a human visual system model. Approximations to the optimal filtering yields a broad set of filters for patterned displays. This page contains links to technical papers and a brief overview of ClearType.

  • LCDs do not really have full-color pixels. The pixels in an LCD are arrayed in vertical stripes with red sub-pixels displaced 1/3 of a pixel to the left of green and blue sub-pixels 1/3 of a pixel to the right. Traditional display algorithms ignored such physical properties of the display device and forfeited the resolution enhancement provided by ClearType.

    How does ClearType filtering work? Unlike ad-hoc techniques, ClearType approaches the problem mathematically. Here is the problem statement: you want to display an image that contains any possible color at an infinite resolution. However, all you can do is display an intensity of a single color for every sub-pixel. So, let’s choose the sub-pixel intensities so that the image that is produced by the LCD is “close” to the ideal image with all colors at infinite resolution. How do you define “close”? ClearType uses a model of the human visual system to define what “close” means. The human visual system can detect errors in image, but it is more sensitive to errors that have a spatially large extent, rather than in the fine detail. Also, the human visual system is more sensitive to detail errors in black/white brightness, rather than in color.

    The process of finding the best LCD sub-pixel values takes a red/green/blue input image (at some resolution) and produces a red/green/blue output image (at the sub-pixel output resolution). Given the human visual system model, the best value for an LCD sub-pixel can be shown mathematically to depend linearly on all of the input pixel colors in a neighborhood of the LCD sub-pixel. In other words, all of the input colors influence all of the output colors.

    The input-to-output mapping thus can be expressed as a family of nine linear filters derived from an optimization problem: one for each combination of input color and output color. The coefficients of these nine filters depend on the human visual model and on the pattern of sub-pixel colors. Note that conventional anti-aliasing ignores the display color pattern and applies the same linear filter for each color component. ClearType, on the other hand, can be thought of as including a display specific anti-aliasing technique.

    One approximation to the optimal ClearType filters is to have the output sub-pixel only depend on pixels of the same color in the input image. This approximation consists of only three out of the original nine filters: a red filter, a green filter, and a blue filter. For example, the red sub-pixels value is the result of applying the red filter to the red channel of the input image.

    Now, if you examine these three filters, you find something interesting: the filters are similar to each other, but the red filter is displaced 1/3 of a pixel to the left of the green filter, and the blue filter is displaced 1/3 of a pixel to the right of the green filter. Thus, the ClearType filters can be viewed as spatially displaced filters. These displaced filters take into account the spatial arrangement of the sub-pixels, unlike conventional anti-aliasing. These displaced filters yield a significant increase in apparent resolution

    In summary, ClearType uses information about a display to produced crisper fonts. ClearType is very general: it applies to any pattern of LCD pixels, not just repeating RGB. It applies to any color font and any color background and any width object (indeed, it can apply to an arbitrary image!). ClearType also can accept fonts that are rasterized at a higher resolution than the sub-pixel resolution (which yields fewer “jaggies”).