desktop/source/lib/init.cxx | 22 ++++++++++++++++++++++ include/sal/log-areas.dox | 1 + 2 files changed, 23 insertions(+)
New commits: commit be7d65019566eba59ec596672d9d25b56e47f748 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 16:10:42 2022 +0200 Add SAL_INFOs for the recorded and pruned font substitutions Change-Id: Ice7b64c87bff6dbc0eead7bda36f3b0a678986e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139037 Tested-by: Tor Lillqvist <t...@collabora.com> Reviewed-by: Tor Lillqvist <t...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b1691938e3ce..c902af328e0f 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2612,6 +2612,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. @@ -2647,6 +2658,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); diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 543db1db1391..e1c89b1f7df2 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -318,6 +318,7 @@ certain functionality. @section LibreOfficeKit @li @c lok +@li @c lok.fontsubst @li @c lok.tiledrendering @li @c lok.dialog