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

When parsing a regular font (not a collection) the index is ignored #105

Closed
Pietrek14 opened this issue Sep 30, 2022 · 4 comments
Closed

Comments

@Pietrek14
Copy link
Contributor

It should return FaceParsingError::FaceIndexOutOfBounds when reading from an index different from 0 instead.

An example code that represents what I'm talking about:

let data = FONT;

assert_eq!(fonts_in_collection(&data), None);
assert_eq!(
    Face::parse(&data, 1).unwrap_err(),
    FaceParsingError::FaceIndexOutOfBounds
);

Right now the second assertion fails.

@RazrFalcon
Copy link
Owner

Well, I guess so. It's not that important honestly, but sure, could be improved.

@Pietrek14
Copy link
Contributor Author

Made a pull request (#106) that will resolve this issue when merged.

@Pietrek14
Copy link
Contributor Author

@RazrFalcon I don't want to rush you, but do you know how long it might take for these changes to reach the crates.io version? I need them to implement font collection support in Bevy.

@RazrFalcon
Copy link
Owner

Done.

I'm still not sure why do rely on this behaviour in the first place, but fine.

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

No branches or pull requests

2 participants