mirror of https://github.com/qt/qtbase.git
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.
Fixes: QTBUG-122168
Change-Id: I6f5dad579bd987149e613b8071821aaf70a89bc2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 6bd85d4a27
)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
233ce5b018
commit
84bbfd9c62
|
@ -1256,9 +1256,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;
|
||||
}
|
||||
|
|
|
@ -1030,6 +1030,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