diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-08-24 07:53:16 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2020-09-05 05:22:45 +0200 |
commit | 973a795bec836be88eb1d19657dfad26b9aa959f (patch) | |
tree | 06556dc7178d7c17bd810179ae12bb0170e2fcb9 /src | |
parent | 247c10bf4cb427146b87631906391aae442f7c7b (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qfontdatabase.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); |