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

[fontbe] pass explicit axis_count when constructing Gvar #833

Merged
merged 3 commits into from
May 30, 2024

Conversation

anthrotype
Copy link
Member

Will fix #815

CI will be 🔴 until googlefonts/fontations#919 is merged write-fonts dependency bumped

Fixes #815

Untested as it requires googlefonts/fontations#919 (and write-fonts dependency bump) to work...
@anthrotype anthrotype marked this pull request as draft May 29, 2024 16:14
@anthrotype anthrotype marked this pull request as ready for review May 30, 2024 15:04
Comment on lines +58 to +62
// in the unlikely event that we have more than 65535 axes...
.map_err(|_| Error::OutOfBounds {
what: "axis count".into(),
value: axis_order.len().to_string(),
})?;
Copy link
Member

Choose a reason for hiding this comment

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

I would personally unwrap here, since I can't imagine this being possible for any conceivable font, but 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

just wait a few years :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I strongly prefer Result unless it can't happen. Rationale: if we unwrap all the things that shouldn't happen but plausibly can then it's all but assured we'll hit some of them in production and rue the day we didn't use Result.

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

looks good!

@anthrotype anthrotype force-pushed the fontbe-explicit-gvar-axis-count branch from f3c7154 to 9fc1180 Compare May 30, 2024 16:17
@anthrotype anthrotype added this pull request to the merge queue May 30, 2024
Merged via the queue into main with commit 912d5de May 30, 2024
10 checks passed
@anthrotype anthrotype deleted the fontbe-explicit-gvar-axis-count branch May 30, 2024 16:31
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.

Variable GPOS feature for non-variable glyph? (invalid gvar axisCount)
3 participants