|
From: Jouni K S. <jk...@ik...> - 2006-08-04 12:28:40
|
João Fonseca <joa...@ma...> 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 |