[cairo] Underlining text, etc?
fejj at novell.com
Thu Oct 1 10:43:42 PDT 2009
Ian Britten wrote:
> Dominic Lachowicz wrote:
>> Cairo doesn't support font markup. Pango does support the few features
>> you mentioned, though.
> Thanks for the info!
> I'm not sure if you were suggesting I use Pango - Unfortunately, that's
> not possible. (I'm in code that is roughly equivalent to Pango though,
> layout out text, rendering it, etc).
> However, I may try to grep around in the Pango code to see if I can
> figure out how they're supporting their features. (Not always fun...)
Take a look at FreeType2's underline_position and underline_thickness
attributes on the FT_Face you're using to render the glyphs. Once you
know those values, it's pretty trivial to render underlines.
(I assume you are using FreeType2)
More information about the cairo