Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Fix read mode when loading cached AFM fonts#6898
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Indeed, reading through afm.py, it looks like it expects all of the reads to return bytestrings given that it does comparisons against literal byte-strings. |
This piqued my interest a bit, and I noticed that we are inconsistent with how we are opening the AFM files. Grepping through reveals a few more non-binary open() calls. Would you like to fix those, too? |
actually, looks like that was the only one, although the one in font_manager.py could benefit from context manager. I'll backport just this. |
Fix read mode when loading cached AFM fonts
Backported to v2.x via08e2520. |
This fixes a typo to read cached AFM fonts as a byte string, as needed by the AFM class in
afm.py
. This bug is triggered when testing PR#5161.cc:@mdboom