[Cairo] Re: [xsvg] cairo_text_extents ?
christof at petig-baender.de
Wed Nov 26 06:50:05 PST 2003
John Ellson schrieb:
> 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.
it does not have to ...
> 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:
IIRC the tuple x,y,w,h,advancex,advancey clearly covers all information
needed for a glyph (advancex/advancey might depend on the next character
x/y should equal bearingX/Y (x and y might be negative)
FT only defines five values for a glyph (bearingX+Y, width, height,
More information about the cairo