Kaydet (Commit) 26ac0e16 authored tarafından Khaled Hosny's avatar Khaled Hosny

Fix thinko in previous commit

Negative descender means the glyph is above the baseline and no shift
should happen.

Change-Id: I0ee3575051e47f16c64db4e85c0b8a390029567f
üst c4820366
......@@ -328,7 +328,8 @@ void CairoTextRender::DrawServerFontLayout( const GenericSalLayout& rLayout, con
// the glyph’s baseline.
cairo_text_extents_t aExt;
cairo_glyph_extents(cr, &cairo_glyphs[nStartIndex], nLen, &aExt);
cairo_glyphs[nStartIndex].y += aExt.x_advance - aExt.height - aExt.y_bearing;
double nDescender = std::fmax(aExt.height + aExt.y_bearing, 0);
ydiff = (aExt.x_advance - nDescender) / nHeight;
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment