Hello,
there is a bug in the lib/matplotlib/font_manager.py file,
which prevents fonts under /usr/share/fonts from being detected:
the callback function for os.path.walk should have three
arguments, but in the current code only has one.
This can be fixed with the following patch:
···
======================================================================
diff -u -r1.4 font_manager.py
--- font_manager.py 30 Sep 2004 19:33:05 -0000 1.4
+++ font_manager.py 13 Oct 2004 21:22:13 -0000
@@ -64,7 +64,7 @@
# common application, not really useful
"/usr/lib/openoffice/share/fonts/truetype/",
# documented as a good place to install new fonts...
- "/usr/share/fonts",
+ "/usr/share/fonts/",
# okay, now the OS X variants...
"~/Library/Fonts/",
"/Library/Fonts/",
@@ -132,12 +132,12 @@
else:
fontpaths = []
#def add(arg, directory, files):
- def add(directory):
+ def add(arg,directory,files):
fontpaths.append(directory)
for fontdir in X11FontDirectories:
try:
if os.path.isdir(fontdir):
- os.path.walk(fontdir, add, ())
+ os.path.walk(fontdir, add, None)
except (IOError, OSError, TypeError, ValueError):
pass
return fontpaths
I hope this helps,
Jochen
--
http://seehuhn.de/