ClearType
From Wikipedia, the free encyclopedia
ClearType is a registered trademark for a technology developed by Microsoft Corporation to improve the appearance of text on certain types of computer display screens, especially LCD flat-panel monitors. It is based on subpixel rendering technology.
Contents |
[edit] Introduction
Computer displays in which the positions of individual pixels are permanently fixed by the design of the hardware—such as most modern flat-panel displays—can show strong aliasing artifacts, which manifest as jagged, saw-tooth edges (sometimes referred to as “jaggies”) when displaying small, high-contrast graphic elements such as text. ClearType uses anti-aliasing at the subpixel level to greatly reduce visible artifacts on such displays when text is rendered, making the text appear “smoother” and more legible.
While the exact implementation of ClearType is specific to Microsoft, the older principles upon which it is based have been known and used for many years in various types of display systems, such as that used by computers with NTSC television sets in the 1970s.
Like most other types of subpixel rendering, ClearType actually involves a compromise, sacrificing one aspect of image quality (color or chrominance detail) for another (light and dark or luminance detail). The compromise improves text appearance because when viewing black and white text, luminance detail is more important than chrominance. The compromise works because it takes advantage of certain peculiarities of human vision.
ClearType is applied only to text that is rendered as such by user and system applications. Other graphic display elements (including text that has already been converted to bitmaps) are not altered by ClearType. For example, text in Microsoft Word will be rendered on the screen with ClearType enhancement, but text placed in a bitmapped image in a program such as Adobe Photoshop will not be modified. This is important because the ClearType technology is extremely specific to text rendering on certain types of computer displays; it would not be useful and could even degrade perceived image quality if it were applied in any other circumstances.
ClearType is not used for text being printed on paper. Most printers already use such small pixels for printing that aliasing is never a problem, and in any case they don't have the fixed, addressable subpixels that ClearType requires.
Computer files that contain text are unaffected by ClearType, since ClearType is applied only when the text is actually being rendered onto the screen of a computer display.
[edit] How ClearType works
Normally, the software in a computer treats the computer’s display screen as a rectangular array of square, indivisible pixels, each of which has an intensity and color that are determined by the blending of three primary colors: red, green, and blue. However, actual display hardware usually implements each pixel as a group of three adjacent, independent subpixels, each of which displays a different primary color. Thus, on a real computer display, each pixel is actually composed of separate red, green, and blue subpixels. For example, if a flat-panel display is examined under a magnifying glass, the pixels may appear as follows:
In the illustration above, there are nine pixels, but there are 27 subpixels.
If the computer controlling the display knows the exact position and color of all the subpixels on the screen, it can take advantage of this to improve the apparent sharpness of the images on the screen in certain situations. If each pixel on the display actually contains three rectangular subpixels of red, green, and blue, in that fixed order, then things on the screen that are smaller than one full pixel in size can be rendered by lighting only one or two of the subpixels. For example, if a diagonal line with a width smaller than a full pixel must be rendered, then this can be done by lighting only the subpixels that the line actually touches. If the line passes through the leftmost portion of the pixel, only the red subpixel is lit; if it passes through the rightmost portion of the pixel, only the blue subpixel is lit. This effectively triples the sharpness of the image at normal viewing distances; but the drawback is that the line thus drawn will show color fringes upon very close examination (at some points it might look green, at other points it might look red or blue).
ClearType uses this method to improve the sharpness of text. When the elements of a type character are smaller than a full pixel, ClearType lights only the appropriate subpixels of each full pixel in order to more closely follow the outlines of the character. Text rendered with ClearType looks “smoother” and more legible than text rendered without it, provided that the pixel layout of the display screen exactly matches what ClearType expects.
The following picture shows a 4× enlargement of the word Wikipedia rendered using ClearType. The word was originally rendered using a Times New Roman 12 pt font.
In this magnified view, it becomes clear that, while the overall sharpness of the text seems to improve, there is some color fringing of the text. At normal magnification (1×), however, only the sharpness is perceptible, and the color fringing becomes invisible.
An extreme close-up of a color display shows (a) text rendered without ClearType and (b) text rendered with ClearType. Note the changes in subpixel intensity that are used to increase effective resolution when ClearType is enabled—without ClearType, all pixels are completely on or completely off.
[edit] ClearType and human vision
ClearType and similar technologies work because human vision is much more sensitive to variations in intensity than it is to variations in color. The human eye can discern contrasts in intensity about three times better than it can discern contrasts in color; thus, when ClearType sacrifices color accuracy in order to improve the sharpness of light and dark, the overall effect—as seen by human eyes—is an improvement.
[edit] Display requirements
ClearType and allied technologies require display hardware with fixed pixels and subpixels. More precisely, the positions of the pixels and subpixels on the screen must be exactly known to the computer to which it is connected. This is the case for flat-panel displays, on which the positions of the pixels are permanently fixed by the design of the screen itself. Almost all flat panels have a perfectly rectangular array of square pixels, each of which contains three rectangular subpixels in the three primary colors, with the normal ordering being red, green, and blue. ClearType assumes this arrangement of pixels when rendering text.
ClearType does not work with flat-panel displays that are operated at resolutions other than their “native” resolutions, since only the native resolution corresponds exactly to the actual positions of pixels on the screen of the display.
If a display does not have the type of fixed pixels that ClearType expects, text rendered with ClearType enabled may actually look worse than type rendered without it. Some flat panels have unusual pixel arrangements, with the colors in a different order, or with the subpixels positioned differently (in three horizontal bands, or in other ways). ClearType needs to be manually tuned for use with such displays (see below). Similarly, displays that have no fixed pixel positions, such as CRT displays, may be harder to read if ClearType is enabled.
Additionally, when images are prepared to be display-independent (that is, when they are prepared for distribution, and not just for display on the computer with which they were prepared), ClearType should be turned off if rendered text is part of the image. For example, screenshots should always be prepared with ClearType turned off. Image-editing programs such as Adobe Photoshop or Corel Paint Shop Pro bypass ClearType when rendering text directly, for precisely this reason.
[edit] ClearType tuning
Most recent versions of Microsoft Windows only allow ClearType to be turned on or off. However, there are other parameters that can be set via a tool that Microsoft makes available for free download from its site. See Microsoft's ClearType Tuner PowerToy for details.
The tuner has wizard and advanced modes that adjust the same parameters visually or by direct selection.
- Cleartype on/off
- RGB or BGR sub pixel structure, though BGR is quite rare, so the default works for most monitors
- Contrast
[edit] Sensitivity to display orientation
Because ClearType utilizes the physical layout of the red, green and blue pigments of the LCD screen, it is sensitive to the orientation of the display.
ClearType in Windows XP currently supports the RGB and BGR sub pixel structures. Rotated displays, in which the subpixels are arranged vertically rather than horizontally, are not currently supported[1]. Using ClearType on these display configurations will actually reduce the display quality. The best option for users of Windows XP having rotated LCD displays (Tablet PCs or swivel-stand LCD displays) is using regular anti-aliasing, or switching off font-smoothing altogether.
The software developer documentation for Windows CE states that ClearType for rotated screens is supported on that platform[2].
Vertical sub pixel structures are fully supported in the Windows XP Tablet PC Edition[3] and in Windows Vista (referred to as "Y-direction anti-aliasing" in the section on the Windows Presentation Foundation).
Vertical sub pixel structures are also supported in Freetype (used by the Linux desktops KDE and GNOME.) Here, the vertically stacked variants of the sub pixel structures are referred to as vRGB and vBGR.
[edit] Patent
ClearType is protected by U.S. Patent 6,307,566 Methods and apparatus for performing image rendering and rasterization operations.
[edit] See also
[edit] External links
- Explanation of ClearType at Microsoft Typography
- Technical Overview of ClearType Filtering from Microsoft Research
- Sub-Pixel Font Rendering Technology: History and Technique Explanation by Steve Gibson, includes free downloadable Windows demo.
- sample implementation in the C language by Damian Yerrick of Everything2
- "Displaced Filtering for Patterned Displays" by Platt et al: a research paper detailing ClearType's techniques.
- ClearType Tuner PowerToy for Windows XP, from Microsoft's site
- ClearType Tuner webpage for accessing ClearType without downloading the PowerToy
- SubLCD a free non patented subpixel method.