[HarfBuzz] harfbuzz: Branch 'pango' - 3 commits
Simon Hausmann
hausmann at kemper.freedesktop.org
Wed Aug 1 03:08:24 PDT 2007
pango/pango-harfbuzz.c | 15 +++++++--------
src/harfbuzz-shaper.h | 1 -
tests/shaping/main.cpp | 9 ++++-----
3 files changed, 11 insertions(+), 14 deletions(-)
New commits:
diff-tree 5990b95f7c54faf0e57fa28bebc82f6e5ad3ca67 (from 7cba6c2c9cb634e79f22473c33f2da1563e1446a)
Author: Simon Hausmann <shausman at trolltech.com>
Date: Wed Aug 1 12:12:12 2007 +0200
Fix compilation (use userData instead of the removed faceData field in HB_Font)
diff --git a/pango/pango-harfbuzz.c b/pango/pango-harfbuzz.c
index 2abe096..de20b2a 100644
--- a/pango/pango-harfbuzz.c
+++ b/pango/pango-harfbuzz.c
@@ -71,7 +71,7 @@ static HB_Bool hb_stringToGlyphs(HB_Font
{
hb_uint32 i;
HB_Glyph *glyphPtr = glyphs;
- PangoFcFont *fc_font = PANGO_FC_FONT (font->faceData);
+ PangoFcFont *fc_font = PANGO_FC_FONT (font->userData);
for (i = 0; i < length; ++i) {
gunichar ch;
@@ -96,7 +96,7 @@ static HB_Bool hb_stringToGlyphs(HB_Font
static void hb_getAdvances(HB_Font font, const HB_Glyph *glyphs, hb_uint32 numGlyphs, HB_Fixed *advances, int flags)
{
- PangoFont *pfont = PANGO_FONT (font->faceData);
+ PangoFont *pfont = PANGO_FONT (font->userData);
hb_uint32 i;
for (i = 0; i < numGlyphs; ++i) {
@@ -108,7 +108,7 @@ static void hb_getAdvances(HB_Font font,
static HB_Bool hb_canRender(HB_Font font, const HB_UChar16 *string, hb_uint32 length)
{
- PangoFcFont *fc_font = PANGO_FC_FONT (font->faceData);
+ PangoFcFont *fc_font = PANGO_FC_FONT (font->userData);
hb_uint32 i;
for (i = 0; i < length; ++i) {
gunichar ch;
@@ -141,7 +141,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)
{
- PangoFcFont *fc_font = PANGO_FC_FONT (font->faceData);
+ PangoFcFont *fc_font = PANGO_FC_FONT (font->userData);
HB_Error error = HB_Err_Ok;
FT_Face face = pango_fc_font_lock_face (fc_font);
@@ -174,7 +174,7 @@ done:
void hb_getGlyphMetrics(HB_Font font, HB_Glyph glyph, HB_GlyphMetrics *metrics)
{
- PangoFont *pfont = PANGO_FONT (font->faceData);
+ PangoFont *pfont = PANGO_FONT (font->userData);
PangoRectangle logRect;
PangoRectangle inkRect;
@@ -189,7 +189,7 @@ void hb_getGlyphMetrics(HB_Font font, HB
HB_Fixed hb_getFontMetric(HB_Font font, HB_FontMetric metric)
{
- PangoFont *pfont = PANGO_FONT (font->faceData);
+ PangoFont *pfont = PANGO_FONT (font->userData);
PangoFontMetrics *metrics = pango_font_get_metrics(pfont, NULL);
HB_Fixed value = 0;
@@ -319,8 +319,7 @@ basic_engine_shape (PangoEngineShape *en
hbFace = HB_NewFace(face, hb_getSFntTable);
hbFont.klass = &hb_fontClass;
- hbFont.userData = 0;
- hbFont.faceData = fc_font;
+ hbFont.userData = fc_font;
hbFont.x_ppem = face->size->metrics.x_ppem;
hbFont.y_ppem = face->size->metrics.y_ppem;
hbFont.x_scale = face->size->metrics.x_scale;
diff-tree 7cba6c2c9cb634e79f22473c33f2da1563e1446a (from parents)
Merge: 7765d5c52f4afbef40ef1afbe39fe4bf69a3877f d34bcf298bb999e84d75df9d8ad35366a44ceb80
Author: Simon Hausmann <shausman at trolltech.com>
Date: Wed Aug 1 12:11:15 2007 +0200
Merge branch 'master' into pango
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