Run complex condition finding in GroupGlyphs()#174
Merged
garretrieger merged 14 commits intow3c:mainfrom Jan 19, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.