summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Hausmann <shausman@trolltech.com>2007-08-01 12:11:09 +0200
committerSimon Hausmann <shausman@trolltech.com>2007-08-01 12:11:09 +0200
commitd34bcf298bb999e84d75df9d8ad35366a44ceb80 (patch)
treee25051ce764c1b181abb0b65a0fa09396e406b0b
parenta467630b2ae0163da0855d39acecd87d18c445a6 (diff)
Get rid of the unused faceData field in HB_Font.
-rw-r--r--src/harfbuzz-shaper.h1
-rw-r--r--tests/shaping/main.cpp9
2 files changed, 4 insertions, 6 deletions
diff --git a/src/harfbuzz-shaper.h b/src/harfbuzz-shaper.h
index f70a147..108566a 100644
--- a/src/harfbuzz-shaper.h
+++ b/src/harfbuzz-shaper.h
@@ -211,7 +211,6 @@ typedef struct HB_Font_ {
HB_UShort x_ppem, y_ppem;
HB_16Dot16 x_scale, y_scale;
- void *faceData;
void *userData;
} HB_FontRec;
diff --git a/tests/shaping/main.cpp b/tests/shaping/main.cpp
index d30a1d8..54740da 100644
--- a/tests/shaping/main.cpp
+++ b/tests/shaping/main.cpp
@@ -50,7 +50,7 @@ static HB_UChar32 getChar(const HB_UChar16 *string, hb_uint32 length, hb_uint32
static HB_Bool hb_stringToGlyphs(HB_Font font, const HB_UChar16 *string, hb_uint32 length, HB_Glyph *glyphs, hb_uint32 *numGlyphs, HB_Bool /*rightToLeft*/)
{
- FT_Face face = (FT_Face)font->faceData;
+ FT_Face face = (FT_Face)font->userData;
if (length > *numGlyphs)
return false;
@@ -73,7 +73,7 @@ static void hb_getAdvances(HB_Font /*font*/, const HB_Glyph * /*glyphs*/, hb_uin
static HB_Bool hb_canRender(HB_Font font, const HB_UChar16 *string, hb_uint32 length)
{
- FT_Face face = (FT_Face)font->faceData;
+ FT_Face face = (FT_Face)font->userData;
for (hb_uint32 i = 0; i < length; ++i)
if (!FT_Get_Char_Index(face, getChar(string, length, i)))
@@ -99,7 +99,7 @@ static HB_Error hb_getSFntTable(void *font, HB_Tag tableTag, HB_Byte *buffer, HB
HB_Error hb_getPointInOutline(HB_Font font, HB_Glyph glyph, int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints)
{
HB_Error error = HB_Err_Ok;
- FT_Face face = (FT_Face)font->faceData;
+ FT_Face face = (FT_Face)font->userData;
int load_flags = (flags & HB_ShaperFlag_UseDesignMetrics) ? FT_LOAD_NO_HINTING : FT_LOAD_DEFAULT;
@@ -201,8 +201,7 @@ static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script)
HB_FontRec hbFont;
hbFont.klass = &hb_fontClass;
- hbFont.userData = 0;
- hbFont.faceData = face;
+ hbFont.userData = face;
hbFont.x_ppem = face->size->metrics.x_ppem;
hbFont.y_ppem = face->size->metrics.y_ppem;
hbFont.x_scale = face->size->metrics.x_scale;