vcl/source/font/PhysicalFontCollection.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 6457ade879b90a6d84871cefe46e17e30e68920e Author: Luboš Luňák <l.lu...@centrum.cz> AuthorDate: Thu Feb 25 20:59:45 2021 +0000 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Mon Mar 1 15:55:47 2021 +0100 do not repeatedly call getenv("SAL_NO_FONT_LOOKUP") In the profiling data I see it actually takes 1% of the CPU time. Change-Id: I55de0191ac9fb17095e7d137f4efc1735936e233 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111571 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 6741f79faae2..5606b321af15 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -948,7 +948,8 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r if( !Count() ) return nullptr; - if (getenv("SAL_NO_FONT_LOOKUP") != nullptr) + static bool noFontLookup = getenv("SAL_NO_FONT_LOOKUP") != nullptr; + if (noFontLookup) { // Hard code the use of Liberation Sans and skip font search. sal_Int32 nIndex = 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits