diff --git a/lib/matplotlib/afm.py b/lib/matplotlib/afm.py index 5a2cffbfbb7b..1b5f4d5f6a0d 100644 --- a/lib/matplotlib/afm.py +++ b/lib/matplotlib/afm.py @@ -19,7 +19,7 @@ ... 'fonts', 'afm', 'ptmr8a.afm') >>> >>> from matplotlib.afm import AFM - >>> with open(afm_fname) as fh: + >>> with open(afm_fname, 'rb') as fh: ... afm = AFM(fh) >>> afm.string_width_height('What the heck?') (6220.0, 694)