ClearType for Squeak/Sub-pixel antialiasing

Tim Rowledge rowledge at interval.com
Thu Oct 7 18:46:26 UTC 1999


> It should be quite simple to copy Squeak's existing text display loop, but
using a font that is N times larger than normal, and using WarpBlt in place
> of BitBlt.
[snip]
> 
> However outline fonts and anti-aliased rendering is a more general solution
that combi
> nes the virtues of tiny characters, sub-ixel alignment, and smooth characters
of any s
> ize with no need to replicate font structures.
Can't argue with that, but if you can afford a little memory and come up with a
reasonable caching strategy you mix the two to very good effect.
Render from outline fonts to a (set of) glyph buffers and then used these
cached bitmaps as local source for fast displaying. The Acorn scheme (which has
actually been written up in several conference papers, though I can't find an
references at the moment) uses a sparse cache - only the used characters and
only in the partial-pixel offsets requested are rendered, in a sort of JIT
basis. Works very well and is quite effective with only 64Kb of cache for most
situations, though 256Kb is good when you know you are using a lot of fonts in
a DTP setting. And of course the same techniques can work very well for
rendering 300dpi fonts for dumping to a printer.

One of the really interesting tricks to doing it well seems to be some
understanding of the characteristics of the monitor or other display in use. I
noticed that some LCD monitors look _really_ awful when combined with my Acorn,
seemingly because they were so sharply 'square' pixelled that the a-a algorithm
casued some sort of artifacting. Maybe the a-a works with an assumption of a
typical CRT pixel being a gaussian distributed circle? Whatever it is, the
Apple LCD works best with it and some NEC dispaly looked totally demented!

tim

-- 
Strange OpCodes: BDC: Break Down and Cry
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list