From f2fabf77f9bc18448aed0e99a6d7d1d6c5c9c736 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Mon, 20 Aug 2012 11:25:41 +0200 Subject: Fix freetype font rendering for Windows CE Windows CE does not have support for GetGlyphOutline. So addGlyphToPath will not work. QML uses it for their distance field rendering. One option to bypass this issue is to use freetype as rendering backend. Change-Id: I965254344945cbdad771a5d505fb61c1cc2087df Reviewed-by: Friedemann Kleint --- tests/auto/gui/text/qfontdatabase/qfontdatabase.pro | 1 + tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'tests/auto/gui/text/qfontdatabase') diff --git a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro index 0a99e84ed4..3111f515ec 100644 --- a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro +++ b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro @@ -4,6 +4,7 @@ TARGET = tst_qfontdatabase SOURCES += tst_qfontdatabase.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" QT += testlib +!mac: QT += core-private gui-private platformsupport-private wince* { additionalFiles.files = FreeMono.ttf diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index ef37b53430..a87513e8eb 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -44,6 +44,9 @@ #include #include #include +#ifndef Q_OS_MAC +#include +#endif class tst_QFontDatabase : public QObject { @@ -73,6 +76,10 @@ private slots: void addAppFont_data(); void addAppFont(); + +#ifndef Q_OS_MAC + void fontName(); +#endif }; tst_QFontDatabase::tst_QFontDatabase() @@ -268,5 +275,13 @@ void tst_QFontDatabase::addAppFont() QCOMPARE(db.families(), oldFamilies); } +#ifndef Q_OS_MAC +void tst_QFontDatabase::fontName() +{ + QString fontName = QBasicFontDatabase::fontNameFromTTFile(QStringLiteral("FreeMono.ttf")); + QCOMPARE(fontName, QStringLiteral("FreeMono")); +} +#endif + QTEST_MAIN(tst_QFontDatabase) #include "tst_qfontdatabase.moc" -- cgit v1.2.3