From: Behdad Esfahbod Date: Wed, 1 Aug 2012 04:21:09 +0000 (-0400) Subject: [hb-old] Adjust mark positioning parameters X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0834d952017a04c6f4599e574cb75ecf3ca27d3b;p=platform%2Fupstream%2FlibHarfBuzzSharp.git [hb-old] Adjust mark positioning parameters Fallback mark positioning works now... With hb-ft and hb-view / hb-shape at least. --- diff --git a/src/hb-old.cc b/src/hb-old.cc index 1f6bf7f..9d1a005 100644 --- a/src/hb-old.cc +++ b/src/hb-old.cc @@ -149,12 +149,12 @@ hb_old_getGlyphMetrics (HB_Font old_font, hb_font_get_glyph_extents (font, glyph, &extents); - metrics->xOffset = extents.x_bearing; - metrics->yOffset = extents.y_bearing; + metrics->x = extents.x_bearing; + metrics->y = extents.y_bearing; metrics->width = extents.width; - metrics->height = extents.height; - metrics->x = hb_font_get_glyph_h_advance (font, glyph); - metrics->y = 0; + metrics->height = -extents.height; + metrics->xOffset = hb_font_get_glyph_h_advance (font, glyph); + metrics->yOffset = 0; } static HB_Fixed diff --git a/src/hb-old/harfbuzz-shaper.cpp b/src/hb-old/harfbuzz-shaper.cpp index 62886f3..f410780 100644 --- a/src/hb-old/harfbuzz-shaper.cpp +++ b/src/hb-old/harfbuzz-shaper.cpp @@ -63,6 +63,7 @@ static inline void positionCluster(HB_ShaperItem *item, int gfrom, int glast) offsetBase += HB_FIXED_CONSTANT(4); else offsetBase += size; + offsetBase = -offsetBase; //qreal offsetBase = (size - 4) / 4 + qMin(size, 4) + 1; // qDebug("offset = %f", offsetBase);