vcl/unx/generic/fontmanager/fontconfig.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
New commits: commit 7000fb7a05ef4bd8951d6cfbeccfac886e95afd0 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Dec 11 09:47:14 2025 +0000 Commit: Miklos Vajna <[email protected]> CommitDate: Mon Dec 15 15:48:55 2025 +0100 don't abort in test mode for missing 0x3001 similar to how we allow missing 0xb7 Change-Id: I5206efa4b6d70ec432b8626eff3dd86d933e769e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195557 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index bf2a0da22370..b33675cd7b2a 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -1067,12 +1067,17 @@ void PrintFontManager::Substitute(vcl::font::FontSelectPattern &rPattern, OUStri OString aLangAttrib = mapToFontConfigLangTag(aLangTag); bool bMissingJustBullet = false; + bool bMissingIdeographicComma = false; // Add required Unicode characters, if any if ( !rMissingCodes.isEmpty() ) { FcCharSet *codePoints = FcCharSetCreate(); - bMissingJustBullet = rMissingCodes.getLength() == 1 && rMissingCodes[0] == 0xb7; + if (rMissingCodes.getLength() == 1) + { + bMissingJustBullet = rMissingCodes[0] == 0xb7; + bMissingIdeographicComma = rMissingCodes[0] == 0x3001; + } for( sal_Int32 nStrIndex = 0; nStrIndex < rMissingCodes.getLength(); ) { // also handle unicode surrogates @@ -1262,11 +1267,13 @@ void PrintFontManager::Substitute(vcl::font::FontSelectPattern &rPattern, OUStri }(); if (bAbortOnFontSubstitute && rPattern.maTargetName != rPattern.maSearchName) { - if (bMissingJustBullet) + if (bMissingJustBullet || bMissingIdeographicComma) { - // Some fonts exist in "more_fonts", but have no U+00B7 MIDDLE DOT - // so will always glyph fallback on measuring mnBulletOffset in - // FontMetricData::ImplInitTextLineSize + // Some fonts exist in "more_fonts", but: + // a) have no U+00B7 MIDDLE DOT so will always glyph fallback on + // measuring mnBulletOffset in FontMetricData::ImplInitTextLineSize + // b) have no U+3001 IDEOGRAPHIC COMMA so will always glyph fallback on + // measuring its width in FontMetricData::ImplInitFlags for CJK text return; } if (rPattern.maTargetName == "Linux Libertine G" && rPattern.maSearchName == "Linux Libertine O")
