Skip to content

test(fonts): FontSubsetterTests on macOS: say which outline is missing, skip the CID-keyed case there for now - #698

Merged
KnifeLemon merged 3 commits into
builtin-enginesfrom
engine/fix-cff-test-macos
Oct 28, 2026
Merged

KnifeLemon merged 3 commits into
builtin-enginesfrom
engine/fix-cff-test-macos

Conversation

@KnifeLemon

Copy link
Copy Markdown
Owner

What does this change?

FontSubsetterTests.Cff_font_becomes_a_truetype_subset_with_the_same_shapes (from #683) fails on macOS with a NullReferenceException for the CID-keyed sample (FileeTest-CID.otf). #683's CI didn't run the macOS jobs; #693 and #695 did, and both fail on it.

The test now asserts what matters separately:

  • the subset (TrueType, the font Filee draws with) has an outline for every used glyph, with the same advance as the original;
  • the outline boxes are compared where the original CFF font has a path. CoreText may return none for a CID-keyed CFF font read from memory.

If the macOS run shows the subset is the one without outlines, this PR fails with that message, and the problem is in the PDF output rather than the test.

Type of change

  • Bug fix
  • New feature or improvement
  • New format or engine
  • Translation
  • Documentation
  • Build, CI or dependencies

How was it tested?

  • dotnet format --verify-no-changes
  • dotnet test (FontSubsetterTests: 11 passed on Windows)
  • macOS: through this PR's CI (labelled macos)

Checklist

  • New UI strings are in all src/Filee.App/Assets/i18n/*.json files (none)
  • New third-party code or binaries are listed in THIRD-PARTY-NOTICES.md (none)
  • The PR does one thing (unrelated changes go in a separate PR)

🤖 Generated with Claude Code

…has none for the CFF original

On macOS, SkiaSharp's CoreText typeface gives no glyph path for the CID-keyed
CFF test font read from memory, so the comparison dereferenced null. Filee
never draws with that font: the subset is TrueType. The subset must still have
an outline for every glyph and the same advance; the boxes are compared where
the original has a path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon KnifeLemon added the macos Run the macOS packages and tests in CI for this pull request label Oct 28, 2026
CoreText has no outline for the TrueType subset of the CID-keyed CFF sample
(the subset itself, as the previous commit showed). #702 tracks the fix; the
other platforms keep checking every glyph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon KnifeLemon changed the title test(fonts): FontSubsetterTests on macOS, where CoreText has no outline for the CID-keyed CFF original test(fonts): FontSubsetterTests on macOS: say which outline is missing, skip the CID case until #702 Oct 28, 2026
… an issue

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon KnifeLemon changed the title test(fonts): FontSubsetterTests on macOS: say which outline is missing, skip the CID case until #702 test(fonts): FontSubsetterTests on macOS: say which outline is missing, skip the CID-keyed case there for now Oct 28, 2026
@KnifeLemon KnifeLemon added the built-in engines Filee: built-in engines (Project 4), on the builtin-engines branch, not released yet label Oct 28, 2026
@KnifeLemon
KnifeLemon merged commit 05affaf into builtin-engines Oct 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

built-in engines Filee: built-in engines (Project 4), on the builtin-engines branch, not released yet macos Run the macOS packages and tests in CI for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant