Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 253848b commit 877d3e4Copy full SHA for 877d3e4
1 file changed
lib/matplotlib/backends/backend_pdf.py
@@ -1081,7 +1081,9 @@ def _get_font_afm(self, prop):
1081
font = self.afm_font_cache.get(key)
1082
if font is None:
1083
filename = fontManager.findfont(prop, fontext='afm')
1084
- font = AFM(file(filename))
+ fh = file(filename)
1085
+ font = AFM(fh)
1086
+ fh.close()
1087
self.afm_font_cache[key] = font
1088
return font
1089
0 commit comments