From 31b3986e2dfc962e271a74fa43333c4621e3bd50 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 20 Sep 2016 16:29:58 +0200 Subject: [PATCH] Fix DirectWrite engine when loading from data through QRawFont The stretch, once it is passed to the font engine, is assumed to be the horizontal scale needed to match the requested stretch for the given font. When loading from data in QRawFont, there is no way to specify this stretch; the scale should always be 1. The effect of this was that when DirectWrite was backing a font loaded through QRawFont directly from data, then the glyph images would be scaled to 0xHEIGHT before they were returned, thus they would be empty. This was a regression caused by ec7fee968f5f1a842b7d2fe670de1d517ecca308. Task-number: QTBUG-56091 Change-Id: I38e76e0e8f6809262474922946752b2ad0d6209b Reviewed-by: Konstantin Ritt Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsfontdatabase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 04b9530890..d667036e8a 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -1257,6 +1257,7 @@ QT_WARNING_POP request.pixelSize = pixelSize; request.styleStrategy = QFont::PreferMatch; request.hintingPreference = hintingPreference; + request.stretch = QFont::Unstretched; fontEngine = QWindowsFontDatabase::createEngine(request, QWindowsContext::instance()->defaultDPI(),