From 973a795bec836be88eb1d19657dfad26b9aa959f Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 24 Aug 2020 07:53:16 +0200 Subject: 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 --- src/gui/text/qfontdatabase.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/text') diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 43f7f5b35a..811d887134 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -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); -- cgit v1.2.3