diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2012-07-10 11:33:25 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-10 14:23:56 +0200 |
commit | a620b778964158e1e38d780d62cd807276001796 (patch) | |
tree | fa296d419b3f2e7ceea53a50cf61fe5b830ec615 /src/plugins | |
parent | e316519c0e0e1c77aa1039d58776631800f29149 (diff) |
Use DirectWrite font engine for non-ttf fonts as well
DirectWrite supports different font types, not just TTF. In order
to enable e.g. CFF support, we simply remove the test for TTF
which was initially put in to be on the safe side when handling
bitmap fonts. However, using DirectWrite with bitmap fonts also
seems to work fine, so there's no reason to have the fallback.
Task-number: QTBUG-22654
Change-Id: I8572bc421ab3dd223025ea152ba9b33f7cf33a8a
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsfontdatabase.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 25f6c4aa21..1f3c51cb37 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -1758,9 +1758,7 @@ QFontEngine *QWindowsFontDatabase::createEngine(int script, const QFontDef &requ ttf = tm.tmPitchAndFamily & TMPF_TRUETYPE; SelectObject(hdc, oldObj); - if (!ttf || !useDirectWrite) { - useDirectWrite = false; - + if (!useDirectWrite) { if (hfont && (!ttf || request.stretch != 100)) { DeleteObject(hfont); if (!res) |