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@collabora.co.uk>
diff --git a/vcl/unx/generic/fontmanager/fontsubst.cxx b/vcl/unx/generic/fontmanager/fontsubst.cxx
index 034f77b..3bc4431 100644
--- a/vcl/unx/generic/fontmanager/fontsubst.cxx
+++ b/vcl/unx/generic/fontmanager/fontsubst.cxx
@@ -145,9 +145,10 @@
    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;
    }