Description: As I understand, the intended purpose of the `SAL_NON_APPLICATION_FONT_USE` environment variable is to isolate tests from the system fontconfig. Unfortunately, this does not seem to work in all cases. For example: `CppunitTest_sw_txtimport` requires use of Chinese text. On a clean install of Ubuntu 24.04 without any CJK features, this test passes as expected. However, after installing CJK font packages, this test fails due to an assertion in font fallback. The assertion does technically stop the test from using the system font, but the existence of a system-wide config file pointing to a system font changes the test's behavior. Steps to Reproduce: 1. Install Ubuntu 24.04 with Japanese language support (System -> Manage Installed Languages -> Install/Remove Languages...), `fonts-noto-cjk`, and `fonts-noto-cjk-extra`. 2. Run test `CppunitTest_sw_txtimport` with non-application font use set to `abort`. The test will fail. 3. Remove CJK-related font config and rebuild cache. (On my system, in `/etc/fonts/conf.d` remove `30-cjk-aliases.conf`, `64-language-selector-cjk-prefer.conf`, `69-*.conf`, `70-fonts-noto-cjk.conf`, and then run `fc-cache -f`.) 4. Run test `CppunitTest_sw_txtimport`, as before. The test now passes. Actual Results: Test behavior is affected by system fontconfig configuration files. Expected Results: Tests should behave the same way regardless of system fontconfig. Reproducible: Always User Profile Reset: No Additional Info: Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: e406fc87d631cb2edf3c6dec70772cd0511a251c CPU threads: 32; OS: Linux 6.8; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Jonathan Clark committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/95dd795e7510e62e9fc316e5ac8c1057b58a8f4e Related: tdf#161533 Test fixes for CJK systems It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.