Font error

Jo�o Fonseca <joao.fonseca@...1203...> writes:

RuntimeError: Could not load facefile /System/Library/Fonts/
LucidaGrande.dfont; Unknown_File_Format. I don't think there is a
problem with the font file, I checked this with Font Book and
everything is ok.

Apparently matplotlib doesn't understand dfont files. You could get
fondu (from e.g. darwinports) and convert the file into a bunch of ttf
files and put them somewhere that matplotlib looks (I guess the
matplotlib data path would work). A workaround is to edit your
$HOME/.matplotlib/matplotlibrc to force the default sans-serif font to
be Bitstream Vera Sans (and similarly Bitstream Vera Serif for serif
and Bitstream Vera Sans Mono for monospace), which are distributed
with matplotlib. Remove the ttffont.cache file from your .matplotlib
directory if the changes don't come into effect otherwise.

The subsystem that searches for fonts and the subsystem that uses
fonts should be synchronized to accept the same fonts; preferably by
improving the latter, but it would help to make the former as
selective as the latter.

···

--
Jouni