Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c766846

Browse files
committed
read cached afm files as bytes
1 parent 3f7e675 commit c766846

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/mathtext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ def _get_font(self, font):
11191119
cached_font = self.fonts.get(basename)
11201120
if cached_font is None:
11211121
fname = os.path.join(self.basepath, basename + ".afm")
1122-
with open(fname, 'r') as fd:
1122+
with open(fname, 'rb') as fd:
11231123
cached_font = AFM(fd)
11241124
cached_font.fname = fname
11251125
self.fonts[basename] = cached_font

0 commit comments

Comments
 (0)