[hb-old] Adjust mark positioning parameters

Fallback mark positioning works now...  With hb-ft and hb-view /
hb-shape at least.
This commit is contained in:
Behdad Esfahbod 2012-08-01 00:21:09 -04:00
parent 4ca743dfb8
commit 0834d95201
2 changed files with 6 additions and 5 deletions

View File

@ -149,12 +149,12 @@ hb_old_getGlyphMetrics (HB_Font old_font,
hb_font_get_glyph_extents (font, glyph, &extents); hb_font_get_glyph_extents (font, glyph, &extents);
metrics->xOffset = extents.x_bearing; metrics->x = extents.x_bearing;
metrics->yOffset = extents.y_bearing; metrics->y = extents.y_bearing;
metrics->width = extents.width; metrics->width = extents.width;
metrics->height = extents.height; metrics->height = -extents.height;
metrics->x = hb_font_get_glyph_h_advance (font, glyph); metrics->xOffset = hb_font_get_glyph_h_advance (font, glyph);
metrics->y = 0; metrics->yOffset = 0;
} }
static HB_Fixed static HB_Fixed

View File

@ -63,6 +63,7 @@ static inline void positionCluster(HB_ShaperItem *item, int gfrom, int glast)
offsetBase += HB_FIXED_CONSTANT(4); offsetBase += HB_FIXED_CONSTANT(4);
else else
offsetBase += size; offsetBase += size;
offsetBase = -offsetBase;
//qreal offsetBase = (size - 4) / 4 + qMin<qreal>(size, 4) + 1; //qreal offsetBase = (size - 4) / 4 + qMin<qreal>(size, 4) + 1;
// qDebug("offset = %f", offsetBase); // qDebug("offset = %f", offsetBase);