Damon McDougall <damon.mcdougall@...287...> writes:
(Pdb) p fh
<closed file '/Users/Damon/Library/Fonts/lcmssi8.afm', mode 'r' at
That's a font that probably came with a TeX distribution and somehow got
installed in your font library.
(Pdb) p line
'C 0 ; WX 708.333 ; N Gamma ; B 0 0 836.364 684.027 ;'
Failing on this line is a bug in matplotlib, since the AFM spec says
that bounding-box coordinates are "numbers", not "integers". Apparently
not many AFM files use that precise bounding boxes, since we haven't run
into this before.
I don't know how the MacPorts packaging system would react to modifying
installed files, but I imagine that applying the attached patch should
Also, after some curiosity, I realised the file ~/.matplotlib/
fontList.cache doesn't exist. In fact, the ~/.matplotlib directory is
empty, there aren't even any hidden files. On my other computer,
matplotlib works fine and the ~/.matplotlib directory contains three
files: fontList.cache, fontManager.cache and tex.cache.
Maybe the files just didn't get written into your directory, since
matplotlib bailed out at the first failure.
afm-bbox.patch (634 Bytes)