kc106_2005-matplotlib@...9... writes:
Now, I am running into another problem. Everything works fine up to
8 page plots. Starting with the 9th page, MPL chokes at line 1084 in
backend_pdf.py and couldn't find the cooresponding ttf file
(VeraSe.ttf) but it had no problem reading that file for the first 8
plots.
Does the following change help with this? (If you are following svn,
just run "svn update"; otherwise, the easiest way is to replace line
1084 by the three lines prefixed with + below.)
Index: backend_pdf.py
···
===================================================================
--- backend_pdf.py (revision 3044)
+++ backend_pdf.py (revision 3045)
@@ -1081,7 +1081,9 @@
font = self.afm_font_cache.get(key)
if font is None:
filename = fontManager.findfont(prop, fontext='afm')
- font = AFM(file(filename))
+ fh = file(filename)
+ font = AFM(fh)
+ fh.close()
self.afm_font_cache[key] = font
return font
--
Jouni K. Sepp�nen
http://www.iki.fi/jks