[squeak-dev] Re: [Ann] Enhanced StrikeFonts (antiAliasing , subPixel AA)

Juan Vuletich juan at jvuletich.org
Tue Aug 4 09:41:09 UTC 2009


Hi Goran,

Göran Krampe wrote:
> Hi!
>
> Andreas Raab wrote:
>> Other than that: Way to go!
>
> First of all - superb work! And really nice to see how work from Cuis 
> enter squeak.org.
>
> Just one silly question:
>
>>> To do proper antialiasing / subpixel AA _without_ requiring new 
>>> BitBlt modes, I use RGBMul BitBlt rule, and a second pass with 
>>> RGBAdd rule. 
>
> So... is this a better approach than adding new bitblt modes or is it 
> just equally fine? Just wondering, I have no knowledge in this area.

It is not a silly question at all!

I've been playing with the idea of arbitrary depth StrikeFonts for about 
2 years now. Until recently, my objective was to do the best that could 
be done without requiring new plugins, even if far from perfect. Then, 
in May, Andy Tween (the author of the new BitBlt rule) said in VM-dev: 
"I believe that the existing bitBlt rules are insufficient to cover all 
these circumstances, but I am happy to be proved wrong :)". So I started 
thinking about it, and I realized they are indeed enough, and came out 
with this two pass idea. BTW, black text only needs the first pass. So, 
it is even faster than the new mode for black text.

So far, they give exactly the same result. The differences might appear 
for Display depths of 8 bits and less (RGBMul / RGBAdd don't work there, 
and I guess Rule 41 won't work either). Something I like of my approach 
is how well it works even with 4bpp glyps (to save space), and the fact 
it never uses extra glyph caches. It does all it magic with just one 
glyph definition for each font/character, just like older StrikeFonts. 
So memory consumptions is predictable, once the font is created, no more 
objects are created. And there is no Weak / GC stress at all. On the 
other hand, Rule 41 supports gamma correction. I really don't know how 
important this might be for text.

BTW, this 2-pass idea could be used to render any kind of font (or any 
kind of bitmap object). It could be useful for rendering TTCFonts and 
FT2Fonts too, avoiding the need to create colored glyphs cache.

Cheers,
Juan Vuletich

> regards, Göran 




More information about the Squeak-dev mailing list