diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-18 19:54:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-19 10:23:29 +0200 |
commit | 68cd0a974c83fbcbda809a0005e5d599a6e4909f (patch) | |
tree | 6ac4bfd05026abb17d84a3f2bbea3863525f6797 | |
parent | 58c013516694b1083abdbc76300ed003f6a456c5 (diff) |
Related: tdf#132536 limit to ~25 pre-rendered font previews for now
The font caches look b0rked, the massive charmaps are ~never swapped out, and
don't count towards the size of a font in the font cache and if the freetype
font cache size is set experimentally very low then we crash, so there's an
awful lot to consider there.
Change-Id: I0e322109c02b00cfb6aff88b4fa650ac3cb1f178
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94466
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index fafc2cb02868..f47408e49b60 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -528,7 +528,12 @@ namespace IMPL_LINK_NOARG(FontNameBox, UpdateHdl, Timer*, void) { CachePreview(mnPreviewProgress++, nullptr); - if (mnPreviewProgress < mpFontList->size()) + // tdf#132536 limit to ~25 pre-rendered for now. The font caches look + // b0rked, the massive charmaps are ~never swapped out, and don't count + // towards the size of a font in the font cache and if the freetype font + // cache size is set experimentally very low then we crash, so there's an + // awful lot to consider there. + if (mnPreviewProgress < std::min<size_t>(25, mpFontList->size())) maUpdateIdle.Start(); } |