When finding the engine for a fallback font, then clear the families

If it is a fallback font, then it should just have family set to that
font so it does not get interference from what the families were
originally set to.

Fixes: QTBUG-85560
Change-Id: I6232f3d2ae12052fa3b0b3bc0e7f106e239a585d
Pick-to: 5.15
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Andy Shaw 2020-08-24 07:53:16 +02:00
parent 247c10bf4c
commit 973a795bec

View File

@ -2431,6 +2431,7 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
for (int i = 0; !engine && i < fallbacks.size(); i++) {
QFontDef def = request;
def.families.clear();
def.family = fallbacks.at(i);
QFontCache::Key key(def, script, multi ? 1 : 0);
engine = fontCache->findEngine(key);