On 10/10/2011 08:25 AM, Andreas H. wrote:
> Hi,
>
> I would like to use .otf fonts for typesetting text (axes, titles, labels,
> legends, ...) in matplotlib. Is this possible? If yes, how?
Yes.  Put the font somewhere in your font search path.  (Where that 
would be depends on your platform, but for user-local fonts, use 
"~/.fonts" on Linux, "~/Library/Fonts" on OS-X, I don't recall on 
Windows, but Googling should give you something).  You will need to 
delete the matplotlib font cache so that it will discover new fonts.  
This lives in "~/.matplotlib/fontList.cache" on Unix platforms.  Then 
you can change the default font family by setting the "font.family" 
rcParam to the name of the font.

Note that matplotlib does not support all of the features of otf fonts, 
like glyph substitution etc. -- it really only uses the basic 
"TrueType-like" parts of the font file.
> If not directly, perhaps via XeTeX?
>
This is another avenue, and has the potential to use the advanced 
features of otf.  I've never attempted this myself, but perhaps one of 
the other users on this list who uses usetex more often can comment.

Mike

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to