Re: puzzled by metrics



On Fri, 2004-01-23 at 04:42, Luca Padovani wrote:
> Hello,
> 
> I don't understand what is wrong with the following experiment. I ask
> Pango to layout three chars (x, +, 1) and I get the following metrics:
> 
> Pango font, pango_layout_get_extents:
> 
> x Ascent= -12288 Descent= 30720 y=  12288 height= 18432
> + Ascent=  -9216 Descent= 30720 y=   9216 height= 21504
> 1 Ascent=  -7168 Descent= 30720 y=   7168 height= 23552

You are getting the "Ascent" value from PANGO_ASCENT(rect)? That's
only meaningful for a rectangle that expresses positions from 
the baseline, like the extents of a PangoLayoutLine or glyph
extents.

Look at the macro definition, draw some diagrams, and I think
you'll see how it all works :-)

Regards,
						Owen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]