Fix read mode when loading cached AFM fonts#6898
Merged
WeatherGod merged 1 commit intomatplotlib:masterfrom Aug 4, 2016
Merged
Fix read mode when loading cached AFM fonts#6898WeatherGod merged 1 commit intomatplotlib:masterfrom
WeatherGod merged 1 commit intomatplotlib:masterfrom
Conversation
Member
|
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. |
Member
|
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? |
Member
|
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. |
WeatherGod
added a commit
that referenced
this pull request
Aug 4, 2016
Fix read mode when loading cached AFM fonts
Member
|
Backported to v2.x via 08e2520. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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