Skip to content

test: Isolate fontconfig in test_text_freetype2_bundled_font - #1081

Merged
zackees merged 2 commits into
masterfrom
fix/1076-freetype2-test-fontconfig
Oct 16, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/1076-freetype2-test-fontconfig

Conversation

@zackees

@zackees zackees commented Oct 16, 2026

Copy link
Copy Markdown
Member

Fixes #1076

Root cause: the test resolved the default face through the host's fontconfig, so a system-installed JetBrainsMono Nerd Font won over the bundled copy and the path assertion failed. CI's container has no such font, so it never showed.

RED (first commit): the same binary run with a fontconfig whose system dir holds the face fails 2 of 3 cases (13 != 0 at test_text_freetype2_bundled_font.c:23); also fails plain on a machine with the font installed.
GREEN (second commit): main() sets FONTCONFIG_FILE to a generated config with no system dirs before the first fontconfig call. Assertions unchanged. Local run (standalone gcc build, font installed system-wide): 3/3 pass plain and under the host-font config.

Tiers: test-only change; Tiers 1/3/4 not applicable. Tier 2 runs in CI.

…y of the face (#1076)

The same binary run with FONTCONFIG_FILE listing a system font dir that
holds JetBrainsMono Nerd Font fails 2 of 3 cases (path outside
BUNDLED_FONT_DIR), which is what any machine with the font installed sees.
… the face cannot win (#1076)

main() points FONTCONFIG_FILE at a generated config with no system font
dirs before the first fontconfig call, so only the bundled fonts are
visible. The assertions are unchanged. The old test assumed the host had
no JetBrainsMono Nerd Font installed.
@zackees
zackees enabled auto-merge October 16, 2026 12:34
@zackees
zackees added this pull request to the merge queue Oct 16, 2026
Merged via the queue into master with commit 0e8ec1a Oct 16, 2026
25 checks passed
@zackees
zackees deleted the fix/1076-freetype2-test-fontconfig branch October 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test: test_text_freetype2_bundled_font fails on a machine that has JetBrainsMono Nerd Font installed

1 participant