From a5614264d5a5d6d1cc0f2773f4d7cd70195a0546 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 30 Jan 2014 05:46:35 +0200 Subject: Get rid of QGlyphLayout::advances_y ...and thus consume 4 bytes less per glyph and increase the performance a bit. It seems, the only CTFontGetAdvancesForGlyphs() returns both x and y advances, though y advances are always equal to 0 for horizontal orientation and x advances are always equal to 0 for vertical orientation. Also, rename `advances_x` to `advances` for consistency and declare QGlyphLayout's data size in a single place. Change-Id: I56b20f893f8a6feb7aa870e3edbca99dd93ba2e2 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Lars Knoll Reviewed-by: Simon Hausmann --- tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp index eebac28323..74802c3217 100644 --- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp +++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp @@ -1067,7 +1067,7 @@ void tst_QTextScriptEngine::controlInSyllable_qtbug14204() e->shape(0); QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(2)); - QVERIFY(e->layoutData->glyphLayout.advances_x[1] != 0); + QVERIFY(e->layoutData->glyphLayout.advances[1].toInt() != 0); #endif } @@ -1087,8 +1087,7 @@ void tst_QTextScriptEngine::combiningMarks_qtbug15675() e->shape(0); QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(4)); - QEXPECT_FAIL("", "QTBUG-23064", Abort); - QVERIFY(e->layoutData->glyphLayout.advances_y[2] > 0); + QCOMPARE(e->layoutData->glyphLayout.advances[2].toInt(), 0); #else QFontDatabase db; @@ -1106,7 +1105,7 @@ void tst_QTextScriptEngine::combiningMarks_qtbug15675() e->shape(0); QCOMPARE(e->layoutData->items[0].num_glyphs, ushort(3)); - QVERIFY(e->layoutData->glyphLayout.advances_x[1] == 0); + QCOMPARE(e->layoutData->glyphLayout.advances[1].toInt(), 0); #endif } -- cgit v1.2.3