Skip to content

Keep default ignorables that GSUB substituted - #406

Merged
blikblum merged 1 commit into
foliojs:masterfrom
lineto:fix/substituted-default-ignorables
Oct 23, 2026
Merged

blikblum merged 1 commit into
foliojs:masterfrom
lineto:fix/substituted-default-ignorables

Conversation

@lehni

@lehni lehni commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Observed with real fonts: Fira Sans (already in the test data) and our Akkurat family ship a case form of the soft hyphen (uni00AD.case). HarfBuzz shows it in "A­B" with case on; fontkit swaps it for an invisible space.

  • The substituted glyph keeps the soft hyphen's code point (since [Followup] Compose canonical decompositions (NFC) in the default shaper #403), so it was still hidden as a default ignorable
  • Hide only default ignorables that still show their nominal glyph, as HarfBuzz does (hb-shape --features=case FiraSans-Regular.ttf "A­B" gives A uni00AD.case B)
  • Add tests for hiding a soft hyphen and keeping its case form, with Fira Sans

@blikblum

Copy link
Copy Markdown
Member

@lehni
Please rebase

@lehni
lehni force-pushed the fix/substituted-default-ignorables branch from 435b1f0 to a9b1cae Compare October 21, 2026 22:06
@lehni

lehni commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@blikblum rebased

@blikblum

Copy link
Copy Markdown
Member

Conflicted again. Lets merging one at time

- A soft hyphen replaced by its case form was still swapped for an invisible space, as the substituted glyph keeps the soft hyphen's code point
- Hide only default ignorables that still show their nominal glyph, as HarfBuzz does
- Add tests for hiding a soft hyphen and keeping its case form, with Fira Sans
@lehni
lehni force-pushed the fix/substituted-default-ignorables branch from a9b1cae to b620cb3 Compare October 22, 2026 23:29
@lehni

lehni commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@blikblum Rebased onto master. The conflicts come from all the PRs adding their tests at the end of test/shaping.js, so I'll rebase each one after the previous merge.

@blikblum
blikblum merged commit 4bb5599 into foliojs:master Oct 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants