Skip to content

Run complex condition finding in GroupGlyphs()#174

Merged
garretrieger merged 14 commits intow3c:mainfrom
garretrieger:complex_conditions
Jan 19, 2026
Merged

Run complex condition finding in GroupGlyphs()#174
garretrieger merged 14 commits intow3c:mainfrom
garretrieger:complex_conditions

Conversation

@garretrieger
Copy link
Copy Markdown
Contributor

This moves complex condition finding which is currently done post merging to be run as part of the glyph grouping phase which happens prior to init font and merging. This allows the found complex conditions to participate in both processes. Complex conditions are incrementally re-analyzed as needed in response to changes made by the init font and merging processes.

Performed after the initial grouping but before patch combination. Performed for any unmapped glyphs discovered during grouping.
Eliminate usage of a flat_hash_map which influences evaluation order.
This is needed to locate affected glyphs in complex conditions which won't be surfaced in the closure analysis.
Updates are needed if either the partitions are changed, or if we are grouping glyphs that intersect a non-identity partition.
This is the set of segments that will be analyzed to find the conditions within.
In practice this can produce worse condition selection and doesn't save much run time. Left the implementation around since future work may reintroduce this.
…inding.

Incrementally create them for the recursion rather than computing from scratch each time.
No need to keep track of the current fallback segments. The list is only needed at the very end when converting to a segmentation, so just generate it at that time. Simplifies some of the invalidation logic.
Updated section on Integrating into the Segmentation Algorithm to reflect the current state.
@garretrieger garretrieger merged commit 4329294 into w3c:main Jan 19, 2026
3 checks passed
@garretrieger garretrieger deleted the complex_conditions branch January 20, 2026 00:42
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