vcl/unx/generic/fontmanager/fontsubst.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 73f0c21801a3b549236edb04f6e9c4f92e2b8e4e Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Jun 26 11:48:27 2019 +0200 Commit: Xisco Faulí <xiscofa...@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.gran...@collabora.co.uk> (cherry picked from commit 573d3bbb7e836216dae6f684f4de77d0e46c50e3) Reviewed-on: https://gerrit.libreoffice.org/74788 Reviewed-by: Xisco Faulí <xiscofa...@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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits