[Libreoffice-commits] core.git: vcl/unx

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 26 12:08:03 UTC 2019


 vcl/unx/generic/fontmanager/fontsubst.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 573d3bbb7e836216dae6f684f4de77d0e46c50e3
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jun 26 11:48:27 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jun 26 14:07:12 2019 +0200

    tdf#97925 writer, slow scrolling large RTF document
    
    this document appears to have just enough fallback fonts on each page to
    make the cache useless, so just bump up the size of the cache
    considerably, since the cache key/values are really small
    
    Change-Id: I4983de92f66410fee3f04e1e126b2ddb4ec2cbf9
    Reviewed-on: https://gerrit.libreoffice.org/74735
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/unx/generic/fontmanager/fontsubst.cxx b/vcl/unx/generic/fontmanager/fontsubst.cxx
index 034f77bc7be5..3bc44314115d 100644
--- a/vcl/unx/generic/fontmanager/fontsubst.cxx
+++ b/vcl/unx/generic/fontmanager/fontsubst.cxx
@@ -145,9 +145,10 @@ bool FcPreMatchSubstitution::FindFontSubstitute(FontSelectPattern &rFontSelData)
     if( bHaveSubstitute )
     {
         rCachedFontMap.push_front(value_type(rFontSelData, aOut));
-        //fairly arbitrary limit in this case, but I recall measuring max 8
-        //fonts as the typical max amount of fonts in medium sized documents
-        if (rCachedFontMap.size() > 8)
+        // Fairly arbitrary limit in this case, but I recall measuring max 8
+        // fonts as the typical max amount of fonts in medium sized documents, so make it
+        // a fair chunk larger to accomodate weird documents./
+        if (rCachedFontMap.size() > 256)
             rCachedFontMap.pop_back();
         rFontSelData = aOut;
     }


More information about the Libreoffice-commits mailing list