summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/vcl/glyphitemcache.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/vcl/glyphitemcache.hxx b/include/vcl/glyphitemcache.hxx
index 6c151ffaabaf..6c4c1ea1294b 100644
--- a/include/vcl/glyphitemcache.hxx
+++ b/include/vcl/glyphitemcache.hxx
@@ -57,6 +57,12 @@ public:
const vcl::text::TextLayoutCache* layoutCache = nullptr);
void clear();
+ /// Normally, we cannot cache glyphs when doing font fallback, because the font fallbacks
+ /// can cache during the lifetime of the cache, and they are not included in the cache key.
+ /// But during some processes, we can turn this on, as long as we remember to turn it off
+ /// at the end.
+ void SetCacheGlyphsWhenDoingFallbackFonts(bool bOK);
+
static SalLayoutGlyphsCache* self();
SalLayoutGlyphsCache(int size) // needs to be public for vcl::DeleteOnDeinit
: mCachedGlyphs(size)
@@ -102,6 +108,7 @@ private:
SalLayoutGlyphs mLastTemporaryGlyphs;
// If set, info about the last call which wanted a substring of the full text.
std::optional<CachedGlyphsKey> mLastSubstringKey;
+ bool mbCacheGlyphsWhenDoingFallbackFonts = false;
SalLayoutGlyphsCache(const SalLayoutGlyphsCache&) = delete;
SalLayoutGlyphsCache& operator=(const SalLayoutGlyphsCache&) = delete;