[cairo] how to get text size ?

Adrian Johnson ajohnson at redneon.com
Sat Jul 9 12:18:39 UTC 2016


On 09/07/16 20:02, Enrico Weigelt, metux IT consult wrote:
> On 08.07.2016 15:04, Stefan Salewski wrote:
> 
>> Maybe I miss something, but when I type "cairo text" in google I get
>> this proposal at the top
>>
>> https://cairographics.org/manual/cairo-text.html#cairo-text-extents
> 
> that only gives me usable width - the height is really strange:
> for strings it gives 0, for others 6 (i'm using font sizes 20 and 30)
> 
> --mtx
> 

I don't know why you are getting the unusual results for height. A test
case would help us identify the cause. But for text height usually the
font height is better value to use (see cairo_scaled_font_extents).



More information about the cairo mailing list