desktop/source/lib/init.cxx |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

New commits:
commit 38040747155276cfdb1322438d53cdad0b585b9b
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Tue Aug 30 14:15:49 2022 +0300
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Tue Aug 30 20:46:48 2022 +0200

    Add SAL_INFOs for the recorded and pruned font substitutions
    
    Change-Id: Ice7b64c87bff6dbc0eead7bda36f3b0a678986e2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139055
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 23807a7f1403..bbc7224f2141 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2618,6 +2618,17 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
 
         auto aFontMappingUseData = 
OutputDevice::FinishTrackingFontMappingUse();
 
+        if (aFontMappingUseData.size() > 0)
+        {
+            SAL_INFO("lok.fontsubst", "================ Original 
substitutions:");
+            for (const auto &i : aFontMappingUseData)
+            {
+                SAL_INFO("lok.fontsubst", i.mOriginalFont);
+                for (const auto &j : i.mUsedFonts)
+                    SAL_INFO("lok.fontsubst", "    " << j);
+            }
+        }
+
         // Filter out font substitutions that actually aren't any 
substitutions, like "Liberation
         // Serif" -> "Liberation Serif/Regular". If even one of the 
"substitutions" of a font is to
         // the same font, don't count that as a missing font.
@@ -2653,6 +2664,17 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
             }
         }
 
+        if (aFontMappingUseData.size() > 0)
+        {
+            SAL_INFO("lok.fontsubst", "================ Pruned 
substitutions:");
+            for (const auto &i : aFontMappingUseData)
+            {
+                SAL_INFO("lok.fontsubst", i.mOriginalFont);
+                for (const auto &j : i.mUsedFonts)
+                    SAL_INFO("lok.fontsubst", "    " << j);
+            }
+        }
+
         for (std::size_t i = 0; i < aFontMappingUseData.size(); ++i)
         {
             
pDocument->maFontsMissing.insert(aFontMappingUseData[i].mOriginalFont);

Reply via email to