-
Notifications
You must be signed in to change notification settings - Fork 4
Implement support for optional layout feature segmentation and encoding. #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
34ec9c3
to
dca8a9e
Compare
I looked through this informally before the rebase a few minutes ago and it all looks like good progress to me. |
A segment includes a codepoint and feature tag set.
These two classes were representing identical concepts, standardize on SubsetDefinition.
These two classes encode the same information.
…inition has features and codepoints.
…h codepoints and features.
…s with features and codepoints.
Closure analysis subtracts other segments from the init font segment which do not include gids.
See: https://github.com/w3c/ift-encoder/blob/main/docs/experimental/closure_glyph_segmentation.md The 'except' segment is defined as the union of all other segments except for the one being analyzed. As a short cut we were computing it by subtracting the segment of interest from the union of all segments. However, this is not correct when there are overlaps between segments as subtraction may remove the overlapping parts from the except segment. Change to computing the except segment as defined in the design doc. Adds tests for cases that run into this issue.
It's not seeing high hit rates, and the underlying glyph closure cache will already cache the expensive part of the operation.
Since we are getting the list of segment ids we can assemble the complete segment ourselves.
In the absence of a cost function to prevent these cases this heuristic is used to keep optional feature segments as separate patches.
dca8a9e
to
42e4498
Compare
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.
Adds support throughout: