Skip to content

Reorder combining marks like HarfBuzz - #405

Open
lehni wants to merge 1 commit into
foliojs:masterfrom
lineto:fix/canonical-mark-order
Open

lehni wants to merge 1 commit into
foliojs:masterfrom
lineto:fix/canonical-mark-order

Conversation

@lehni

@lehni lehni commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #403, replacing #404 (rebased on #403, and with a real-font case as asked in #380 (comment)).

  • Sort every mark run by combining class instead of keeping the typed order of marks that don't compose (q + U+0307 + U+0323 now orders the dot below first)
  • Use HarfBuzz's modified combining classes, so shadda sorts before Arabic vowels even when the vowel is typed first, and Hebrew, Thai, Telugu and Tibetan marks follow the order fonts expect
  • Move Arabic modifier combining marks (hamza above or below, small high letters) to the start of their run, as in UTR Implement Universal Shaping Engine #53
  • Add tests for Latin reordering, Arabic modifier marks and Allah typed with fatha before shadda in Amiri (ligature and small fatha now match hb-shape)

- Sort every mark run by combining class instead of keeping the typed order of marks that don't compose (q + dot above + dot below now orders the dot below first)
- Use HarfBuzz's modified combining classes, so shadda sorts before Arabic vowels even when the vowel is typed first, and Hebrew, Thai, Telugu and Tibetan marks follow the order fonts expect
- Move Arabic modifier combining marks (hamza above or below, small high letters) to the start of their run, as in UTR foliojs#53
- Add tests for Latin reordering, Arabic modifier marks and Allah typed with fatha before shadda in Amiri, matching hb-shape
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.

1 participant