|
From: Benjamin R. <ben...@ou...> - 2013-02-28 14:49:13
|
On Thu, Feb 28, 2013 at 8:40 AM, CAB <ca...@ya...> wrote: > Hi, All, > > I am using matplotlib 1.2.0 under Windows 7 64-bit. > > I am trying to get matplotlib to recognize a new font that I downloaded > (Arimo, for the curious). I put the .ttf files in the matplotlib ttf font > directory (...\\fonts\\ttf\\ArimoRegularLatin.ttf, etc.), where Bitstream > Vera Sans, STIX, etc. live. But matplotlib does not recognize the new > font, and defaults to Vera Sans. If I load the font_manager and do a > findfont, it does not find the new font and defualts to Vera Sans. > > I also tried putting the ttf files in the system font location, with the > same results. When I do this, other programs like Word can see and use the > font. > > Is there some trick that I'm missing, here? > > Thanks, > Chad > > Most likely, you need to clear out matplotlib's font cache. How to do that for windows, I don't know, but for Linux, it is as simple as "rm ~/.matplotlib/fontList.cache". Maybe there is a similar file somewhere on your system. After getting rid of that file, at the next import of matplotlib, it will recognize that that file is gone and rebuild it. Cheers! Ben |