[cairo] how to get text size ?

Enrico Weigelt, metux IT consult enrico.weigelt at gr13.net
Sat Jul 9 11:47:07 UTC 2016


On 09.07.2016 13:02, Lawrence D'Oliveiro wrote:
> On Sat, 9 Jul 2016 12:32:18 +0200, Enrico Weigelt, metux IT consult
> wrote:
> 
>> On 08.07.2016 15:04, Stefan Salewski wrote:
>>>
>>> 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)
> 
> What font are you using?

monospace, with normal shapes as well as italic+bold.

interestingly, w/ normal font, height is only >0, when a character
goes under the baseline, but independent of the font size.


--mtx


More information about the cairo mailing list