ClearType for Squeak/Sub-pixel antialiasing

Marcel Weiher marcel at metaobject.com
Fri Oct 8 09:44:40 UTC 1999


> From: Adrian Sampaleanu <AdrianS at mgisoft.com>
>
> It seems most people are not checking out the site (my guess,  
since everyone
> is describing what's usually done to achieve sub pixel rendering),  
as the
> technique described on www.grc.com really shows its full effect only on 
> LCD's. It does also have the side-effect of creating anti-aliased  
edges, but
> that is not the main point.

Yes, ClearType and related are quite different from traditional  
anti-aliasing.

1.	Selective anti-aliasing

For font-rendering, simply rendering the glyphs at higher resolution  
and subsampling to a grid is not good enough because it sacrifices  
too much contrast, which is important for legibility.  Fonts need to  
be selectively anti-aliased, with only the diagonal components  
receiving anti-aliasing, horizontal and vertical components remaining  
as is.

2.	Real partial-pixel positioning

Normal anti-aliasing simulates partial pixel positions by computing  
partial coverage and turning that into a gray scale value.  This  
increases the apparent resolution but also reduces the apparent  
sharpness.  On an LCD display it is possible to do away with the  
simulation and really position to sub-pixels.

Consider a color LCD display with a line of 10 RGB pixels:

rgb|rgb|rgb|rgb|rgb|rgb|rgb|rgb|rgb|rgb

This consists of 30 actual LCD-elements (sub-pixels), grouped in RGB  
triples.  If the same LCD were used for a monochrome display, the  
sub-pixels would turn into actualy pixels and we would have a display  
with 3 times the resolution ( 30 pixels).

Although the 3 sub-pixels are usually controlled together, it is  
possible to use color information to address them individually.

For example, a 4 pixel long horizontal white line on a black  
background would usually look like this

rgb|rgb|rgb|RGB|RGB|RGB|RGB|rgb|rgb|rgb

but by using color information at the edges, we can actually  
position this line at sub-pixel intervals

rgb|rgb|rgb|RGB|RGB|RGB|RGB|rgb|rgb|rgb
rgb|rgb|rgb|rGB|RGB|RGB|RGB|Rgb|rgb|rgb
rgb|rgb|rgb|rgB|RGB|RGB|RGB|RGb|rgb|rgb
rgb|rgb|rgb|rgb|RGB|RGB|RGB|RGB|rgb|rgb

This corresponds to the following colored pixel-lines

K|K|K|W|W|W|W|K|K|K
K|K|K|C|W|W|W|R|K|K
K|K|K|B|W|W|W|Y|K|K
K|K|K|K|W|W|W|W|K|K

K - black, W - white, R - red, G - green, B - blue, C - Cyan , M -  
Magenta, Y - Yellow

This results in a white line as long as the pixles balance, the eye  
doesn't care in which order the RGB triples are arranged, it will  
integrate the individual colored dots into an overall color  
impression.

What this means is that although the resolution of the device in  
terms of the elements it can display has not changed, the horizontal  
positioning resolution has been increased by a factor of three.

Marcel





More information about the Squeak-dev mailing list