[cairo] how to get text size ?
ajohnson at redneon.com
Sat Jul 9 13:14:28 UTC 2016
On 09/07/16 22:18, Enrico Weigelt, metux IT consult wrote:
> But I'm still struggling w/ the exact meaning of y_bearing ...
Looking at the diagram below, the rectangle is the extents of the glyph.
In this example think of something like a 'g' where most of it is above
the origin but a bit is below. In cairo the positive Y axis is down. The
y bearing is the distance from the origin to the top of the extents. In
this example the y bearing is negative as the top of the extents is on
the negative Y side of the origin.
x -------- ^
bearing | | |y bearing (negative value)
------>| | |
| | |
More information about the cairo