Skip to content

Honour useMarkFilteringSet lookup flag during glyph iteration#373

Open
lehni wants to merge 1 commit into
foliojs:masterfrom
lineto:fix/use-mark-filtering-set
Open

Honour useMarkFilteringSet lookup flag during glyph iteration#373
lehni wants to merge 1 commit into
foliojs:masterfrom
lineto:fix/use-mark-filtering-set

Conversation

@lehni
Copy link
Copy Markdown

@lehni lehni commented May 20, 2026

Marks outside a lookup's filtering set must be skipped during iteration per the OT spec — useMarkFilteringSet overrides both ignoreMarks and markAttachmentType for marks. Without honouring it, contextual rules either fail to fire or fire on the wrong context, and mark-to-mark positioning attaches to the wrong candidate.

The lookup's filtering set is resolved lazily into a Set<glyphId> (cached per Coverage), threaded through GlyphIterator.reset, and checked in shouldIgnore before the legacy mark-skipping flags.

Test note

The added Mada test exercises an rclt chain whose backtrack also depends on #372 (chain-context backtrack matching order). Both fixes are needed for the test to demonstrate its expected behaviour — the test will pass once #372 lands and this PR is rebased on top.

- Skip marks not in the lookup's filtering set per OT spec
- Overrides ignoreMarks and markAttachmentType for marks
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