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] update metrics scaling to match FreeType #626

Merged
merged 2 commits into from
Sep 27, 2023
Merged

Conversation

dfrg
Copy link
Member

@dfrg dfrg commented Sep 26, 2023

Updates the Metrics and GlyphMetrics types to use an intermediate fixed point calculation for scaling that matches FreeType.

Fixes #590

Updates the `Metrics` and `GlyphMetrics` types to use an intermediate fixed point calculation for scaling that matches FreeType.

Fixes #590
@dfrg
Copy link
Member Author

dfrg commented Sep 26, 2023

To avoid adding clutter, this doesn't address the issue that the Size type can't represent a ppem of 0. Punted to #627

Copy link
Collaborator

@rsheeter rsheeter left a comment

Choose a reason for hiding this comment

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

LGTM subject to tests to prove it works. Naively I'd hve expected at least a unit test with some same scales that are confirmed to match FreeType where previously they did not.

skrifa/src/metrics.rs Outdated Show resolved Hide resolved
@dfrg dfrg merged commit 91e694c into main Sep 27, 2023
@dfrg dfrg deleted the metrics-scale-fix branch September 27, 2023 18:44
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] Small advance differences in Noto Sans between FT and Fontations
3 participants