From 4c6d12e6d22c4b78885c6fe5ac0c1d64a87e3bcf Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 20 Apr 2012 11:21:45 +0300 Subject: Fix missing Windows native fonts in QML applications Windows native fonts were not getting rendered because the font engine was cloned incorrectly for QRawFont, resulting in multi-engine instead of the specific cloned engine. Task-number: QTBUG-25410 Change-Id: I08f543e541739ac1b51f96f381ae1bb20b59399a Reviewed-by: Friedemann Kleint Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/platforms/windows/qwindowsfontengine.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/platforms/windows') diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp index 94072622eb..e074f79c32 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.cpp +++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp @@ -1133,6 +1133,9 @@ QFontEngine *QWindowsFontEngine::cloneWithSize(qreal pixelSize) const if (!uniqueFamilyName.isEmpty()) request.family = uniqueFamilyName; request.pixelSize = pixelSize; + // Disable font merging, as otherwise createEngine will return a multi-engine + // instance instead of the specific engine we wish to clone. + request.styleStrategy |= QFont::NoFontMerging; QFontEngine *fontEngine = QWindowsFontDatabase::createEngine(QUnicodeTables::Common, request, 0, -- cgit v1.2.3