-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
breaking-changeA change that would require a breaking semver bumpA change that would require a breaking semver bump
Description
This method returns None
in the case of an invalid font, currently in the same way ttf-parser provides this. This also means Font::pt_to_px_scale
returns Option.
However, I don't think there is much of a way to handle invalid fonts at the point of using this method. I think it would be better to either just panic for invalid fonts in the method call, or check when initializing a font and return an Err
if units_per_em
is none immediately, which will allow us to unwrap it later.
Having to handle the option makes using point sizes harder than it should be, related #15
Metadata
Metadata
Assignees
Labels
breaking-changeA change that would require a breaking semver bumpA change that would require a breaking semver bump