summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qrawfont
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/text/qrawfont')
-rw-r--r--tests/auto/gui/text/qrawfont/qrawfont.pro2
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp11
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/auto/gui/text/qrawfont/qrawfont.pro b/tests/auto/gui/text/qrawfont/qrawfont.pro
index 8cac4abc57..149ad6442e 100644
--- a/tests/auto/gui/text/qrawfont/qrawfont.pro
+++ b/tests/auto/gui/text/qrawfont/qrawfont.pro
@@ -9,5 +9,3 @@ SOURCES += \
INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
TESTDATA += testfont_bold_italic.ttf testfont.ttf
-
-win32:CONFIG += insignificant_test # QTBUG-24197
diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
index 99e53f3261..a3fe7b5368 100644
--- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
@@ -295,6 +295,15 @@ void tst_QRawFont::advances()
bool supportsSubPixelPositions = font_d->fontEngine->supportsSubPixelPositions();
QVector<QPointF> advances = font.advancesForGlyphIndexes(glyphIndices);
for (int i=0; i<glyphIndices.size(); ++i) {
+#ifdef Q_OS_WIN
+ // In Windows, freetype engine returns advance of 9 when full hinting is used (default) for
+ // some of the glyphs.
+ if (font_d->fontEngine->type() == QFontEngine::Freetype
+ && (hintingPreference == QFont::PreferFullHinting || hintingPreference == QFont::PreferDefaultHinting)
+ && (i == 0 || i == 5)) {
+ QEXPECT_FAIL("", "Advance for some glyphs is not the expected with Windows Freetype engine (9 instead of 8)", Continue);
+ }
+#endif
QVERIFY(qFuzzyCompare(qRound(advances.at(i).x()), 8.0));
if (supportsSubPixelPositions)
QVERIFY(advances.at(i).x() > 8.0);
@@ -879,7 +888,7 @@ void tst_QRawFont::multipleRawFontsFromData()
testFontBoldItalic.loadFromData(file.readAll(), 11, QFont::PreferDefaultHinting);
QVERIFY(testFont.familyName() != (testFontBoldItalic.familyName())
- || testFont.styleName() != (testFontBoldItalic.styleName()));
+ || testFont.style() != (testFontBoldItalic.style()));
}
#endif // QT_NO_RAWFONT