Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

glyph_variation_data returns Err for glyphs with no variation #1277

Open
simoncozens opened this issue Dec 4, 2024 · 0 comments
Open

glyph_variation_data returns Err for glyphs with no variation #1277

simoncozens opened this issue Dec 4, 2024 · 0 comments

Comments

@simoncozens
Copy link
Contributor

font.gvar()?.glyph_variation_data(GlyphId::new(0)) for a font where .notdef does not vary returns "Error: An offset was out of bounds".

This is surprising, because nothing actually went wrong, and I didn't even provide any offsets, so this looks to the user like a bug in the library. If the return type was Result<Option<...>> or Option<Result<...>>,instead of Result, then the lack of variation could be returned more clearly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant