[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Freetype performance question?

From: Michael Sander
Subject: Re: [ft] Freetype performance question?
Date: Thu, 22 Jun 2006 18:44:42 -0700
User-agent: Debian Thunderbird 1.0.7 (X11/20051017)

Does anyone know the best practices of how to display freetype glyphs on windows? Currently I'm creating Bitmap objects and blitting them using bitblt.


Michael Sander wrote:

Thanks for the helpful response....

- the client sends these glyph bitmap images to the X Server through the XRender extension.
 The X Server globally caches them.

- when the client needs to draw some text, it simply sends the positions and glyph 'indices' needed to the X Server, the latter retrieves the bitmaps from its global cache, and performs the composition on the target drawable.

Wow... I can't believe I'm doing it all wrong. Do you know where I can find more information on XRender? The normal google/man search didn't yield too many results.

Also.... what is the standard way of displaying freetype font glyphs on MS Windows? Like on linux, I composite my own bitmaps and then blit them to the screen using BitBlt.

To get back to your point, if you use some sort of glyph bitmap cache, your performance will probably be dominated by the composition code that you'll be using to draw the glyphs into your in-memory bitmap, as well as the network transfer of the result. The performance of FreeType will be totally irrelevant.

Freetype was never the problem.... its really fast! And believe it or not, compositing the freetype glyphs into bitmaps is fast too (as long as you cache them). I was more worried about transferring the bitmaps over a slow X connection. But, as you said, if I can get get the X server to cache them some way or another, that won't be a problem.

Thanks a lot!

It will be much slower than a simple XDrawString, because this one can be hardware accellerated by the X Server. However, note that XDrawString is incapable of performing anti-aliased text rendering.

Hope this helps,

- David Turner
- The FreeType Project  (

*********************************************************************************** Information contained in this email message is confidential and may be privileged, and is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the address@hidden and destroy the original message. ***********************************************************************************

// Michael Sander                                     address@hidden
// Systems Software Engineer - TimeMachine         (805)965-6044 ext.375
// Green Hills Software, Inc.               

reply via email to

[Prev in Thread] Current Thread [Next in Thread]