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

f32 has too little precision for offsets #104

Closed
laurmaedje opened this issue Sep 27, 2022 · 3 comments
Closed

f32 has too little precision for offsets #104

laurmaedje opened this issue Sep 27, 2022 · 3 comments

Comments

@laurmaedje
Copy link
Contributor

The commit, which moved CFF dictionary argument from i32 to f32, breaks outlining for very large fonts. The reason is that some of the private dict offsets are so big that a roundtrip through f32 changes them. This could be fixed simply by switching that part to f64 as it can represent every i32 losslessly.

I encountered the problem with Noto Serif CJK SC, glyph id 20785. Before the commit, outlining worked and after it, outline_glyph returns None.

@RazrFalcon
Copy link
Owner

Makes sense. Will fix it.

@RazrFalcon
Copy link
Owner

@laurmaedje Please check if it worked.

@laurmaedje
Copy link
Contributor Author

Works.

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