https://bugs.documentfoundation.org/show_bug.cgi?id=161533

            Bug ID: 161533
           Summary: Tests affected by system fontconfig with
                    SAL_NON_APPLICATION_FONT_USE=abort
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: graphics stack
          Assignee: [email protected]
          Reporter: [email protected]

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

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to