diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-08-24 07:53:16 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-09-06 05:51:49 +0000 |
commit | 822c7b7109580fa018dde976862400ffabdf51fb (patch) | |
tree | 0db22e30b0c910b20e48617238a0fa9237f55efa /src/gui | |
parent | 9459abbe957ec1d083cebf24e90ebd19a1726d09 (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
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 973a795bec836be88eb1d19657dfad26b9aa959f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui')
-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 b7ad9001d1..1a4d8f938b 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2723,6 +2723,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); |