[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 27 11:09:36 UTC 2019


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

New commits:
commit 73f0c21801a3b549236edb04f6e9c4f92e2b8e4e
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jun 26 11:48:27 2019 +0200
Commit:     Xisco FaulĂ­ <xiscofauli at libreoffice.org>
CommitDate: Thu Jun 27 13:08:50 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>
    (cherry picked from commit 573d3bbb7e836216dae6f684f4de77d0e46c50e3)
    Reviewed-on: https://gerrit.libreoffice.org/74788
    Reviewed-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>

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