[Fontconfig] Single pass text and background

Matthew Allen fret at memecode.com
Wed Jul 16 16:04:38 EST 2003


Hi,

I'm wondering whether there is a single pass method to draw text with a background using Xft? Just flat color, nothing special.

Something like XftDrawStringUtf8 with an extra couple of parameters for a rectangle and color.

This would make it much easier to write flicker free code. Currently I have to fill the area behind the text using a rectangle primitive and then overlay the text, and of course this doesn't happen instantly so between the 2 operations you get background color only on the screen... and thus flicker. Yes I know double buffering fixes this, but the speed + memory hit is a bit much for simple things like standard GUI widgets (tree/list/button etc).

This is one reason windows _looks_ a lot smoother than most X applications, because they can do this. I don't see why it can't be done (maybe I'm missing something in the API?) because it's fairly simple at a technical level.

regards
--
Matthew Allen
(fret at memecode.com) (http://www.memecode.com)





More information about the Fontconfig mailing list