summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2016-09-20 16:29:58 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2016-09-23 07:29:14 +0000
commit31b3986e2dfc962e271a74fa43333c4621e3bd50 (patch)
tree85cad8d2029e18ef8c9ca5bad31d7aef65634ab9 /src
parent9888a2c138c675c5f83ec4d4b8aeac075bc12009 (diff)
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 <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp1
1 files changed, 1 insertions, 0 deletions
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(),