links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Anti-aliased fonts sample desktop
Last updated at 1:32 pm UTC on 14 January 2006
Look below the picture for more information on the sub-pixel rendering illustration in this picture.

External Image

This desktop picture was taken during the development of the first beta of the FreeType plugin for Squeak. In the upper right corner you can see the system font menu, which lists Squeak's installed fonts in their own style. The line "Regular" remains from an earlier, buggy version, which is why it looks weird.

Sub-pixel rendering illustration

In the lower right corner I have made three magnified versions of a sample of the rendered type which illustrate how sub-pixel rendering works. (See this web site for a good explanation of how SPR works.)

Note that sub-pixel rendering only works as intended on color LCD screens because how the R, G, and B elements are positioned on the physical screen.

For instance, the yellow arrow points at one pixel where the R, G, and B pixels are successively less black, giving the effect of fading to the right. (Note that adjacent R, G and B values make up one regular pixel.) For this reason, the pixel as a whole becomes blue, as seen in the upper magnified image. This is because the B component is least black, ie. has the highest intensity of R, G, and B in this pixel. In the pixels above it, the blue component is darkest, which makes the overall pixel color brownish (red+green).

NB: The method for producing this kind of "reversed" sub-pixel rendering into magnified red, green and blue pixels is included in the provided code, as the method Form>>subPixelInverse.

Note 1) use small bitmaps like in the picture above, since the code in this method is slow. 2) it doesn't work correctly on some bitmaps which yield an all-black result. It has something to do with alpha channel values. #subPixelInverse2 is a variant method which sometimes works when the ordinary one doesn't.

Main High-quality font support page

Henrik Gedenryd