[cairo] show_glyphs and writing text

Behdad Esfahbod behdad at behdad.org
Mon Dec 17 07:57:57 PST 2007


On Mon, 2007-12-17 at 09:05 -0500, Donn wrote:
> 
> I realize that show_text() is the easier, but there are all these implications 
> that's it's not fit for much (unicode issues?) and I am also just trying to 
> be thorough. I will also address pango soon.

Well, if using cairo_show_glyphs() was as easy as this, show_text()
would have been doing it...

The short answer lies in FcFreeTypeCharIndex() or FT_Get_Char_Index().
That's what show_text() already does.

The long answer is 25 thousand lines longer.  And that's why you should
use pangocairo.

behdad


PS.  Keith, David, should the toy text backend switch to
FcFreeTypeCharIndex()?  What are the benefits?  We sure don't cache the
result....  Who cares though.

> \d
-- 
behdad
http://behdad.org/

...very few phenomena can pull someone out of Deep Hack Mode, with two
noted exceptions: being struck by lightning, or worse, your *computer*
being struck by lightning.  -- Matt Welsh



More information about the cairo mailing list