Fix color fonts with DirectWrite backend
The logic to detect color fonts in the GDI font database was never implemented in the DirectWrite database, causing emojis to look monochrome. The patch moves this into the font engine itself instead, along with the other initialization code. Pick-to: 6.7 Fixes: QTBUG-122168 Change-Id: I6f5dad579bd987149e613b8071821aaf70a89bc2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
3379fd2322
commit
6bd85d4a27
|
|
@ -1257,9 +1257,6 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q
|
|||
|
||||
QFontDef fontDef = request;
|
||||
fontDef.families = QStringList(QString::fromWCharArray(n));
|
||||
|
||||
if (isColorFont)
|
||||
fedw->glyphFormat = QFontEngine::Format_ARGB;
|
||||
fedw->initFontInfo(fontDef, dpi);
|
||||
fe = fedw;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1033,6 +1033,10 @@ void QWindowsFontEngineDirectWrite::initFontInfo(const QFontDef &request,
|
|||
names->Release();
|
||||
}
|
||||
|
||||
// Color font
|
||||
if (face3->GetPaletteEntryCount() > 0)
|
||||
glyphFormat = QFontEngine::Format_ARGB;
|
||||
|
||||
face3->Release();
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue