AntiAliased text on X [was code bloat]

Kendall Bennett KendallB at scitechsoft.com
Mon Nov 1 15:38:54 PST 2004


Lee Revell <rlrevell at joe-job.com> wrote:

> On Mon, 2004-11-01 at 16:35 +0100, Roland Mainz wrote:
> > That sounds more like that backing-store is turned off in your
> > Xserver... ;-/
> 
> Well if that is what Debian does by default, then maybe... but are
> you really saying that a well tuned Xorg desktop can be as snappy
> as XP (with the classic theme)?  Maybe this was the case a few
> years ago when the typical X desktop was full of pixellated ugly
> fonts.  But since antialiasing became common the performance took a
> dive.  Keep in mind MS has been doing antialiasing for a long time
> and it does not seem to kill the performance to nearly the same
> degree. 

IMHO that is mostly because X.org and all projects above it do anti-
aliasing via RENDER, which requires hardware alpha blending. Doing alpha 
blending in software is really slow. I am pretty sure that Windows does 
cheap anti-aliased fonts without needing hardware ALPHA blending by 
breaking down the glyph into multiple layers of shaded pixels. If you 
have say 8 levels of shading, then you decompose each glyph into 7 
different mono bitmaps, each one representing the pixels that need to be 
drawn in each of the shaded colors. Then you draw them over the top of 
each other with transparency as mono bitmaps, and voila! Anit-aliased 
text.

We do that in our SciTech MGL library (I forget exactly how many levels 
we use in the MGL) and FreeType has always been able to generate these 
types of multi-layer glyphs. For machines with hardware alpha blending 
(and drivers that support it ;-), doing it that way is probably fast 
enough and looks good. But for slower hardware or older hardware, this 
can be done very fast using the existing mono blit hardware used for 
regular text. Sure it would be 7x slower than regular text, but *WAY* 
faster than any blending done in software to the framebuffer.

Regards,

---
Kendall Bennett
Chief Executive Officer
SciTech Software, Inc.
Phone: (530) 894 8400
http://www.scitechsoft.com

~ SciTech SNAP - The future of device driver technology! ~





More information about the xorg mailing list