diff options
Diffstat (limited to 'tests/auto/gui/text/qrawfont/tst_qrawfont.cpp')
-rw-r--r-- | tests/auto/gui/text/qrawfont/tst_qrawfont.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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 |