+2009-04-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * ftfont.c (ftfont_text_extents): Fix calculation of
+ metrics->descent.
+
2009-04-06 Jason Rumney <jasonr@gnu.org>
* frame.c (x_set_font): Avoid C99 mid-block variable declaration.
metrics->lbearing = m->horiBearingX >> 6;
metrics->rbearing = (m->horiBearingX + m->width) >> 6;
metrics->ascent = m->horiBearingY >> 6;
- metrics->descent = (m->horiBearingY + m->height) >> 6;
+ metrics->descent = (m->height - m->horiBearingY) >> 6;
}
first = 0;
}
= width + ((m->horiBearingX + m->width) >> 6);
if (metrics->ascent < (m->horiBearingY >> 6))
metrics->ascent = m->horiBearingY >> 6;
- if (metrics->descent > ((m->horiBearingY + m->height) >> 6))
- metrics->descent = (m->horiBearingY + m->height) >> 6;
+ if (metrics->descent > ((m->height - m->horiBearingY) >> 6))
+ metrics->descent = (m->height - m->horiBearingY) >> 6;
}
width += m->horiAdvance >> 6;
}