CS 248 - Introduction to Computer Graphics
Autumn Quarter, 2001
Marc Levoy
Lecture notes for Tuesday October 2
Reiterating the explanation I gave in class, in the case of the integral pixel font on the LCD, the pixel outlined in yellow is blackened because the stroke covers more than some threshold percentage of the pixel's area; otherwise, it would have been left white. Blackening the pixel turns all three of its color stripes (R,G,B) black. In the antialiased font, the outlined pixel is darkened in proportion to the percentage of the pixel's area that covered by the stroke. Again, all three of its stripes are darkened equally. However, notice that the stroke covers only the red stripe (mostly) and the green stripe (partially); it doesn't cover the blue stripe at all. The subpixel font takes advantage of this fact by adjusting the color of the pixel such that each of its three color stripes are darkened in proportion to the percentage of that stripe's area that is covered by the stroke. Thus, the red stripe is darkened the most, the green stripe is darkened only a bit, and the blue stripe is left untouched. This combination of darkenings corresponds to some RGB color, which is loaded into the frame buffer for this pixel. Thus, the three color stripes within a pixel are not individually "addressable" in the sense of having their own coordinates; they are addressable by employing the trick of adjusting the color displayed in that pixel.
As I mentioned in class, subpixel font rendering technology only works if the alignment of pixels to color stripes can be guaranteed. In other words, it works on an LCD, but not on a CRT. Also, it only works if the font is rendered in grayscale. If the text is made red on black, then we have only the red stripes to play with, and subpixel fonts cannot be used. By the way, this is the first time I've explained this technology in this course. In retrospect, I should probably have waited a few weeks, until after we cover rasterization and antialiasing. For more information on this fascinating technology, look at http://grc.com/cleartype.htm.