[cairo] Cairo text - underlined and striked text

Uli Schlachter psychon at znc.in
Wed Jun 13 18:02:50 UTC 2018


Hi,

On 13.06.2018 09:13, WebSTAR Corp. wrote:
> PS: Is there a way to create underlined & striked text on Cairo?

Uhm, you can get the text dimensions from Cairo. Just draw a line where
the baseline is for underlining. For strike-through use the logical
height of the font and draw the line at the center of the text? (i.e.
baseline plus half the font height to the top)

But yeah, as Bryce wrote in that other mail, Pango is the way to go for
advanced font- and text-related things.

Cheers,
Uli
-- 
- He wants the impossible...!
- That's the short definition of 'captain'.


More information about the cairo mailing list