[HarfBuzz] harfbuzz: Branch 'master'
Simon Hausmann
hausmann at kemper.freedesktop.org
Wed Aug 1 03:08:23 PDT 2007
src/harfbuzz-shaper.h | 1 -
tests/shaping/main.cpp | 9 ++++-----
2 files changed, 4 insertions(+), 6 deletions(-)
New commits:
diff-tree d34bcf298bb999e84d75df9d8ad35366a44ceb80 (from a467630b2ae0163da0855d39acecd87d18c445a6)
Author: Simon Hausmann <shausman at trolltech.com>
Date: Wed Aug 1 12:11:09 2007 +0200
Get rid of the unused faceData field in HB_Font.
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_UChar
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 /*fon
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 *fo
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
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;
More information about the HarfBuzz
mailing list