Skip to content

[Followup] Compose canonical decompositions (NFC) in the default shaper - #403

Merged
blikblum merged 2 commits into
masterfrom
feature/unicode-normalization
Oct 18, 2026
Merged

blikblum merged 2 commits into
masterfrom
feature/unicode-normalization

Conversation

@blikblum

Copy link
Copy Markdown
Member

Follow up to #380

lehni and others added 2 commits October 18, 2026 17:41
- Compose each base + combining-mark cluster into the font's precomposed glyph via font-aware NFC before GSUB, matching HarfBuzz: decomposed input (i + U+0300, or Arabic alef + fathatan + hamza-above) shapes to the precomposed glyph instead of separate marks
- Only apply the result when it changes the glyph count (composition or its decompose fallback); leave pure canonical reordering alone so it can't disturb downstream GSUB (e.g. Arabic shadda + vowel calt)
- Decompose back any composed codepoint the font has no glyph for, so its marks stay available for GPOS mark positioning
- Scope to the default shaper and the Arabic/Hebrew/Thai shapers that inherit it; Indic/Hangul/Universal keep their own composition
- Add 6 canonical-composition shaping tests (FiraSans Latin, Amiri Arabic incl. the reorder regression)
@blikblum
blikblum merged commit 94d1bad into master Oct 18, 2026
3 checks passed
@blikblum
blikblum deleted the feature/unicode-normalization branch October 18, 2026 18:22
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