summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2016-08-05 15:55:30 +0200
committerTim Jenssen <tim.jenssen@qt.io>2016-08-05 15:30:24 +0000
commit121b7b7a3cb401cb1597b8d56b9372f09aae6b51 (patch)
tree73f301c89af41af6bd87a3e92f6a75408b004845
parent7f66289f9d36458b0ab52d02d35ca4aa3ae722c4 (diff)
Windows: Fix Adobe/Mozilla format color fonts after Windows update
After the Anniversary update of Windows 10 (update 1607), color fonts using the Adobe/Mozilla format with embedded SVGs are detected as color fonts by DirectWrite, but they do not contain any colored layers. The result of this was that we would no longer draw these fonts using the pen color, but we would also not support the colored glyphs in the fonts. In order to still support using these fonts as regular monochromatic fonts, we check if there is actually a palette in the font file before registering it as a color font. [ChangeLog][QtGui][Windows] Fixed rendering Adobe/Mozilla format color fonts with other colors than black after Windows 10 Anniversary update. Task-number: QTBUG-55097 Change-Id: I8d74787e49530d1167b9f2533ffdf7ab814c3358 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index 08769a3b39..314da702eb 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -1810,7 +1810,7 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request,
if (SUCCEEDED(directWriteFontFace->QueryInterface(__uuidof(IDWriteFontFace2),
reinterpret_cast<void **>(&directWriteFontFace2)))) {
if (directWriteFontFace2->IsColorFont())
- isColorFont = true;
+ isColorFont = directWriteFontFace2->GetPaletteEntryCount() > 0;
}
#endif
const QFont::HintingPreference hintingPreference =