puzzled by metrics
- From: Luca Padovani <lpadovan cs unibo it>
- To: gtk-i18n-list gnome org
- Subject: puzzled by metrics
- Date: Fri, 23 Jan 2004 10:42:08 +0100
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
If I build myself three glyph strings for the above characters using an
adobe font, I get:
Adobe font, pango_font_get_glyph_extents:
x Ascent= 11264 Descent= 0 y= -11264 height= 11264
+ Ascent= 13312 Descent= 0 y= -13312 height= 13312
1 Ascent= 17408 Descent= 0 y= -17408 height= 17408
The two fonts used are different and so are the numbers in the metrics,
fine. But what about the signs? In particular, why is the ascent of the
pango layout negative? According to the documentation
"The ascent is the distance from the baseline to the highest point of
the character. This is positive if the glyph ascends above the baseline"
Am I to infer that x lays completely below the baseline?
Regards,
-- luca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]