[Cairo] Re: [xsvg] cairo_text_extents ?
John Ellson
ellson at research.att.com
Tue Nov 25 21:13:45 PST 2003
Carl Worth wrote:
>Several similar names do show up for the term known as "left
>sidebearing", "LSB", "sideBearing", etc. But, couldn't we just omit
>this field? Unless I'm missing something, it seems trivial to compute
>this term given the current point and the bounding box.
>
>Or would it help avoid confusion to include left_bearing,
>right_bearing even if redundant?
>
>
It is true that the left_side_bearing, right_side_bearing, ascent,
and descent describe a bounding box. However the terms are
clearly with reference to the origin of the (first) character.
x,y,width,height kind of looses that for me.
There is no fixed relationship between the origin of the first character
of the string and the left-side-bearing. i.e. left_side_bearing
is not, in general, redundant. (It is clearly non-redundant
for vertical text.)
Also, the advance_x not the same as the right-side-bearing.
I recommend the diagrams in the freetype tutorial for understanding the
different measures:
http://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html
John
More information about the cairo
mailing list