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 877d3e4 commit 8851ec2Copy full SHA for 8851ec2
1 file changed
lib/matplotlib/backends/backend_pdf.py
@@ -457,7 +457,9 @@ def writeFonts(self):
457
self.writeObject(self.fontObject, fonts)
458
459
def _write_afm_font(self, filename):
460
- font = AFM(file(filename))
+ fh = file(filename)
461
+ font = AFM(fh)
462
+ fh.close()
463
fontname = font.get_fontname()
464
fontdict = { 'Type': Name('Font'),
465
'Subtype': Name('Type1'),
0 commit comments