[cairo] Underlining text, etc?
Ian Britten
britten at caris.com
Mon Oct 5 05:55:47 PDT 2009
Jeffrey Stedfast wrote:
>> 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?
[ snip ]
> 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).
Ya, I'm starting to see that I'm going to have to rip apart our
non-Cairo rendering engine that I'm trying to patch into, and rework
how it performs underlining (Something I was hoping to avoid...).
Additional complexities that I have to deal with is exotic/advanced
text cases, such as curved text, text with track-kerning ("Expanded"),
multi-line text, in addition to the multiple-font RTF/HTML-like text
that you mentioned.
This could get ugly... :(
Many thanks for the feedback - I suspect this won't be my last post
about this stuff ... :P
Ian
More information about the cairo
mailing list