我想在我的matplotlib图中使用"Heuristica"字体,但它不会显示出来。
我将"Heuristica"定义在rcParameter字体.serif的第一个位置上 --> 没有结果
我将font.family更改为"Heuristica",然后收到了一条消息
findfont: FontFamily not found
这让我思考了一下,因为Heuristica已经安装好了,我可以从其他软件中无问题地访问它。所以我使用了fontManager并执行了以下操作:
import pylab as pl
la = pl.matplotlib.font_manager.FontManager()
lu = pl.matplotlib.font_manager.FontProperties(family = 'Heuristica')
la.findfont(lu)
得到:
Out[7]: 'C:\\Windows\\Fonts\\Heuristica-Regular.otf'
显然可以找到Heuristica字体。我查看了可用的ttf字体(如何在matplotlib中获取字体族或字体名称列表),但是Heuristica不在此列表中。
我会很感激任何帮助。