ClearType for Squeak/Sub-pixel antialiasing

Dan Ingalls Dan.Ingalls at disney.com
Thu Oct 7 19:24:27 UTC 1999


Tim Rowledge <rowledge at interval.com> wrote...
>My understanding of the term 'sub-pixel anti-aliasing' is that is
>effectively a sub-sampling technique that would render the glyphs in a
>larger size than you really want and then sample down with
>anti-aliasing. It's certainly how we used the term when I was with IBM
>research many (many) years ago but it is possible it has been redefined
>since then.
>So to do vertical sub-pixel a-a, you would render the glyphs several
>times over, once for each suitable interval of a pixel fraction times
>the scale factor used. If one were using a scaling factor of 4, then you
>would render the glyphs 4 times over, once for each of the 4 possible
>positionings. Then you'd have to do the same for each of the 4
>horizontal positions as well. I have no doubt that you can actually do
>it much more cleverly than really doing all this work!

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.  WarpBlt will do all the sub-pixel alignment and anti-aliasing on the fly (if you give it the right initial values), with no need to save extra fonts or even to allocate a temporary buffer for rendering at the full resolution.  It won't be blindingly fast, but it will probably compete reasonably well with any other simple approach using bitmapped fonts.

However outline fonts and anti-aliased rendering is a more general solution that combines the virtues of tiny characters, sub-ixel alignment, and smooth characters of any size with no need to replicate font structures.

	- Dan





More information about the Squeak-dev mailing list