Skip to content

Commit

Permalink
fix bug in afm font reading
Browse files Browse the repository at this point in the history
  • Loading branch information
zblz committed Oct 16, 2015
1 parent a97c67c commit 516e583
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/matplotlib/mathtext.py
Expand Up @@ -1051,7 +1051,7 @@ def _get_font(self, font):
cached_font = self.fonts.get(basename)
if cached_font is None:
fname = os.path.join(self.basepath, basename + ".afm")
with open(fname, 'r') as fd:
with open(fname, 'rb') as fd:
cached_font = AFM(fd)
cached_font.fname = fname
self.fonts[basename] = cached_font
Expand Down

0 comments on commit 516e583

Please sign in to comment.