Repository navigation
test: Isolate fontconfig in test_text_freetype2_bundled_font - #1081
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 != 0at 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.