[cairo] Underlining text, etc?

Jeffrey Stedfast fejj at novell.com
Fri Oct 2 14:05:26 PDT 2009


Ian Britten wrote:
[snip]
>
> Irregardless, I'm still open to any suggestions about how to how to
> best use Cairo to do this.  For example, should I draw each underline
> stroke after each character, or should I draw all the underlines
> separately after the characters?  What if the text and strikeout are
> partially transparent - Shouldn't the result have one homogeneous
> alpha?  Is this somewhere I should maybe make use of a Cairo 'group'?
> I haven't used them anywhere yet ...
>   

What I do is render a string of glyphs that all share the same font and
then go back and draw/fill the underline separately (having kept track
of the 'advance' width of the full run of glyphs).

Jeff



More information about the cairo mailing list