summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Hausmann <shausman@rhea.troll.no>2007-02-19 15:35:05 +0100
committerSimon Hausmann <shausman@rhea.troll.no>2007-03-28 12:52:31 +0200
commit13d0415a359ac156a73977d650a659c6c5d630bf (patch)
treea9b2567fdd1732b7ca934856e27e626d4e1b6cb2 /tests
parentc09ccc1e588449f648c3024a17b1114a896b8757 (diff)
Next try :). Separate font and face because for initializing the face we
need a font (sounds strange, but font for use is just the callback)
Diffstat (limited to 'tests')
-rw-r--r--tests/shaping/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/shaping/main.cpp b/tests/shaping/main.cpp
index 5823d2f..bfdbb1a 100644
--- a/tests/shaping/main.cpp
+++ b/tests/shaping/main.cpp
@@ -169,8 +169,8 @@ static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script)
hbFont.klass = &hb_fontClass;
hbFont.userData = 0;
hbFont.freetypeFace = face;
- hbFont.face = 0;
- hbFont.face = HB_NewFace(&hbFont);
+
+ HB_Face hbFace = HB_NewFace(&hbFont);
HB_ShaperItem shaper_item;
shaper_item.kerning_applied = false;
@@ -182,6 +182,7 @@ static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script)
shaper_item.item.bidiLevel = 0; // ###
shaper_item.shaperFlags = 0;
shaper_item.font = &hbFont;
+ shaper_item.face = hbFace;
shaper_item.num_glyphs = shaper_item.item.length;
QVarLengthArray<HB_Glyph> hb_glyphs(shaper_item.num_glyphs);
@@ -213,7 +214,7 @@ static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script)
}
- HB_FreeFace(hbFont.face);
+ HB_FreeFace(hbFace);
uint32_t nglyphs = 0;
const unsigned short *g = s->glyphs;