[rescue] Auction link - just for grins

Meelis Roos mroos at linux.ee
Sun Mar 6 01:26:28 CST 2005


> As far as the anti-aliased fonts goes, that's a hard problem to solve,
> if it's one that people feel a need to solve.  Windows solved it rather
> elegantly; the routines for drawing strings were extended to just DTRT
> if the system's color depth was sufficiently high and the user indicated
> that he wanted antialiased fonts.  In the case that the user didn't want
> them, the old font logic was used.

Yes, it's because Windows font API is different from X11 and you could 
do that.

> This would be a sane fix--put the antialiased crap in Xlib--the CLIENT
> library.  Have it query the X server to find out if it supports the
> EYECANDY-FONTS extension and, if so, just trust the server to DTRT,
> otherwise do the composition on the client in-memory, generate a mask,
> and overlay all that crap on the target drawable.  If the user doesn't
> specifically want AA fonts, just let the server do whatever.

But that's what they have done (almost) - the antialiasing is done in 
the client library, there's a server extension called RENDER that helps 
to harware-accelerate the rendering in case the hardware supports alpha 
blending. If there is no RENDER extension, a software fallback on the 
client side is used. The difference from your description is the 
placement of the clientside library - it's not in the Xlib but it Xft 
library (I don't know why exactly, maybe beacuse that is not part of the 
X protocol/API or maybe to save the apps not using it from the bloat).

And you need client-side vector font acess to do the antialiasing well, 
not just bitmaps. That's why the Xft library does need to have direct 
access to the TTFs (argh!).

> Fonts, in particular, are a sore spot with me because the new round of
> X11 toys requires one to install the whole kitchen sink in order to draw
> letters and is standing between me and the software I want to run on my
> Solaris box.  X -has- a font abstraction mechanism--the font server.  Let
> the FONT SERVER handle TrueType fonts and all that other garbage.

Unfortunately, the font server protocol has the same problems with TTF 
fonts as the X11 protocol itself - it's bitmap-oriented and if you want 
to serve truetype fonts, you have to render the bitmaps of all the ttf 
fonts in all resolutions in the font server (maybe on demand) and then 
transport the bitmaps to the the X server. And you still don't get 
antialiasing in case you would want it.

-- 
Meelis Roos (mroos at linux.ee)



More information about the rescue mailing list