[stsf] Re: AntiAliased text on X [was code bloat]

Roland Mainz roland.mainz at nrubsig.org
Mon Nov 1 16:07:32 PST 2004


Kendall Bennett wrote:
> 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.

Do you have time to look at the STSF font rendering code and check
whether the same can be implemented for it, please ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)


More information about the stsf mailing list