[Libreoffice-commits] core.git: svtools/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue May 19 08:24:07 UTC 2020


 svtools/source/control/ctrlbox.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 68cd0a974c83fbcbda809a0005e5d599a6e4909f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 18 19:54:31 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 19 10:23:29 2020 +0200

    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 at redhat.com>

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();
 }
 


More information about the Libreoffice-commits mailing list