Skip to content
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

[skrifa] return overlap status from scaler #583

Merged
merged 6 commits into from
Aug 24, 2023
Merged

[skrifa] return overlap status from scaler #583

merged 6 commits into from
Aug 24, 2023

Conversation

dfrg
Copy link
Member

@dfrg dfrg commented Aug 23, 2023

Changes Scaler::outline to return a new ScalerMetrics struct that contains the overlap flag. This also has optional fields to represent metrics that may be adjusted by hinting.

Based on #582 which must be merged first.
Fixes #581

First step in addressing #581. Captures simple and composite overlap bits and plumbs them through internally.

Still needs to be exposed in skrifa public API. This will be done in a follow up.
Changes `Scaler::outline` to return a new `ScalerMetrics` struct that contains the overlap flag. This also has optional fields to represent metrics that may be adjusted by hinting.

Based on #582 which must be merged first.
Fixes #581
// GID 2 is a composite glyph with the overlap bit on a component
// GID 3 is a simple glyph with the overlap bit on the first flag
assert_eq!(metrics.has_overlaps, gid == 2 || gid == 3);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same preference for how to assert this as #582

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye

Base automatically changed from simple-overlap to main August 24, 2023 06:11
@dfrg dfrg merged commit 4c071e6 into main Aug 24, 2023
9 checks passed
@dfrg dfrg deleted the scaler-metrics branch August 24, 2023 06:18
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.

[Skrifa] Provide access to glyf overlap flags in scaler
2 participants