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

Skip to content

Commit 516e583

Browse files
committed
fix bug in afm font reading
1 parent a97c67c commit 516e583

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
@@ -1051,7 +1051,7 @@ def _get_font(self, font):
10511051
cached_font = self.fonts.get(basename)
10521052
if cached_font is None:
10531053
fname = os.path.join(self.basepath, basename + ".afm")
1054-
with open(fname, 'r') as fd:
1054+
with open(fname, 'rb') as fd:
10551055
cached_font = AFM(fd)
10561056
cached_font.fname = fname
10571057
self.fonts[basename] = cached_font

0 commit comments

Comments
 (0)