From bd1f61dff608fedf83ef559cd310d546d057d9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 29 Apr 2022 10:40:34 +0100 Subject: [PATCH] abort more writer layout tests if a font isn't found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4d94b60531505f2d5a493b4c51f4c9110d3a4517 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133633 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/CppunitTest_sw_core_layout.mk | 5 +++++ sw/layoutwriter_setup.mk | 2 +- vcl/unx/generic/fontmanager/fontconfig.cxx | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sw/CppunitTest_sw_core_layout.mk b/sw/CppunitTest_sw_core_layout.mk index 2cae001add53..80dc1530fdb3 100644 --- a/sw/CppunitTest_sw_core_layout.mk +++ b/sw/CppunitTest_sw_core_layout.mk @@ -71,6 +71,11 @@ $(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_layout, \ svx \ )) +# assert if font/glyph fallback occurs +$(call gb_CppunitTest_get_target,sw_core_layout): \ + EXTRA_ENV_VARS := \ + SAL_ABORT_ON_NON_APPLICATION_FONT_USE=1 + $(eval $(call gb_CppunitTest_use_more_fonts,sw_core_layout)) # vim: set noet sw=4 ts=4: diff --git a/sw/layoutwriter_setup.mk b/sw/layoutwriter_setup.mk index bf05b937764e..9d10fa9ac2c6 100644 --- a/sw/layoutwriter_setup.mk +++ b/sw/layoutwriter_setup.mk @@ -82,7 +82,7 @@ $(eval $(call gb_CppunitTest_use_uiconfigs,sw_layoutwriter$(1), \ $(call gb_CppunitTest_get_target,sw_layoutwriter$(1)): \ $(call gb_Library_get_target,textconv_dict) -# reset the LD_LIBRARY_PATH for spawned GPG processes +# assert if font/glyph fallback occurs $(call gb_CppunitTest_get_target,sw_layoutwriter$(1)): \ EXTRA_ENV_VARS := \ SAL_ABORT_ON_NON_APPLICATION_FONT_USE=1 diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index c8852639c7b5..7557c2a6abcb 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -1175,8 +1175,6 @@ void PrintFontManager::Substitute(vcl::font::FontSelectPattern &rPattern, OUStri static bool bAbortOnFontSubstitute = getenv("SAL_ABORT_ON_NON_APPLICATION_FONT_USE") != nullptr; if (bAbortOnFontSubstitute && rPattern.maTargetName != rPattern.maSearchName) { - SAL_INFO("vcl.fonts", "PrintFontManager::Substitute: missing font: '" << rPattern.maTargetName << - "' try: " << rPattern.maSearchName << " instead"); if (bMissingJustBullet) { assert(rPattern.maTargetName == "Amiri Quran" || rPattern.maTargetName == "David CLM" || @@ -1187,6 +1185,8 @@ void PrintFontManager::Substitute(vcl::font::FontSelectPattern &rPattern, OUStri // ImplFontMetricData::ImplInitTextLineSize return; } + SAL_WARN("vcl.fonts", "PrintFontManager::Substitute: missing font: '" << rPattern.maTargetName << + "' try: " << rPattern.maSearchName << " instead"); std::abort(); } }