summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformiconengine.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2024-12-10 11:36:45 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2024-12-11 12:05:45 +0100
commit9d47233d2cbbae1aa32240688fcc7a8c08c585d3 (patch)
treee5c2323abe7749d6aee3652d1e391e1e89c4aaeb /src/plugins/platforms/android/qandroidplatformiconengine.cpp
parenta1175255150d27d50f9690d5f8685b31269d9fa1 (diff)
QFontIconEngine: always initialize with a non-merging font
The icon engine needs to be able to rely on glyph indices belonging to the correct font, and we generally don't want the overhead of iterating through potential fallbacks if a named glyph or unicode code point wasn't found in the font. Assert in the QFontIconEngine constructor that the font we get has the NoFontMerging strategy bit set. Amends 2af58490b3d33aab8d08610939fe2b7cab4c469c. Pick-to: 6.9 Change-Id: Ib38324aebbeda956c8dd053969d6cf08f7ef3c35 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformiconengine.cpp')
-rw-r--r--src/plugins/platforms/android/qandroidplatformiconengine.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformiconengine.cpp b/src/plugins/platforms/android/qandroidplatformiconengine.cpp
index 3d33d747455..bab6eeb9d4a 100644
--- a/src/plugins/platforms/android/qandroidplatformiconengine.cpp
+++ b/src/plugins/platforms/android/qandroidplatformiconengine.cpp
@@ -249,7 +249,9 @@ static QFont selectFont()
// last resort - use any Material Icons
if (fontFamily.isEmpty())
fontFamily = u"Material Icons"_s;
- return QFont(fontFamily);
+ QFont font(fontFamily);
+ font.setStyleStrategy(QFont::NoFontMerging);
+ return font;
}
} // namespace FontProvider