summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <shausman@rhea.troll.no>2007-03-28 12:50:39 +0200
committerSimon Hausmann <shausman@rhea.troll.no>2007-03-28 12:52:36 +0200
commite2d4d663468ed274102adbfa163e73ac018c1501 (patch)
treea0aa2b639047d8e77c8561238533defa06d37e22 /src
parent2635a080809c97c39ca790124719143763123223 (diff)
API cleanup, rename getAscent to getFontMetric
Diffstat (limited to 'src')
-rw-r--r--src/harfbuzz-shaper.cpp2
-rw-r--r--src/harfbuzz-shaper.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
index 7196763..4ae0750 100644
--- a/src/harfbuzz-shaper.cpp
+++ b/src/harfbuzz-shaper.cpp
@@ -227,7 +227,7 @@ static inline void positionCluster(HB_ShaperItem *item, int gfrom, int glast)
// qDebug("---> positionCluster: cluster from %d to %d", gfrom, glast);
// qDebug("baseInfo: %f/%f (%f/%f) off=%f/%f", baseInfo.x, baseInfo.y, baseInfo.width, baseInfo.height, baseInfo.xoff, baseInfo.yoff);
- HB_Fixed size = item->font->klass->getAscent(item->font) / 10;
+ HB_Fixed size = item->font->klass->getFontMetric(item->font, HB_FontAscent) / 10;
HB_Fixed offsetBase = HB_FIXED_CONSTANT(1) + (size - HB_FIXED_CONSTANT(4)) / 4;
if (size > HB_FIXED_CONSTANT(4))
offsetBase += HB_FIXED_CONSTANT(4);
diff --git a/src/harfbuzz-shaper.h b/src/harfbuzz-shaper.h
index 4142fc4..0fc6903 100644
--- a/src/harfbuzz-shaper.h
+++ b/src/harfbuzz-shaper.h
@@ -186,6 +186,10 @@ typedef struct {
HB_Fixed xOffset, yOffset;
} HB_GlyphMetrics;
+typedef enum {
+ HB_FontAscent
+} HB_FontMetric;
+
typedef struct {
HB_Bool (*convertStringToGlyphIndices)(HB_Font font, const HB_UChar16 *string, hb_uint32 length, HB_Glyph *glyphs, hb_uint32 *numGlyphs, HB_Bool rightToLeft);
void (*getGlyphAdvances)(HB_Font font, const HB_Glyph *glyphs, hb_uint32 numGlyphs, HB_Fixed *advances, int flags /*HB_ShaperFlag*/);
@@ -193,7 +197,7 @@ typedef struct {
/* implementation needs to make sure to load a scaled glyph, so /no/ FT_LOAD_NO_SCALE */
HB_Error (*getPointInOutline)(HB_Font font, HB_Glyph glyph, int flags /*HB_ShaperFlag*/, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints);
void (*getGlyphMetrics)(HB_Font font, HB_Glyph glyph, HB_GlyphMetrics *metrics);
- HB_Fixed (*getAscent)(HB_Font font);
+ HB_Fixed (*getFontMetric)(HB_Font font, HB_FontMetric metric);
} HB_FontClass;
typedef struct HB_Font_ {