0

昨天我在 Graphviz 上遇到的一个问题——我在 Stack Overflow 或其他地方找不到任何记录这个确切错误的东西,所以我决定把它写下来。

在 Linux 上,对 dot 的每次调用都开始失败并显示错误消息:

No fonts found; this probably means that the fontconfig
library is not correctly configured. You may need to
edit the fonts.conf configuration file. More information
about fontconfig can be found in the fontconfig(3) manual
page and on http://fontconfig.org

但是检查/etc/fonts一下,三个 fontconfig 文件的位置:

/etc/fonts/fonts.conf
/etc/fonts/fonts.dtd
/etc/fonts/conf.d

显示他们都在正确的地方。

fontconfig 命令fc-list还给出了已安装字体的非空列表。

4

1 回答 1

1

如果用户的主目录中存在名为的文件夹.fontconfig,Graphviz 将默认使用安装在该目录中的字体,而不是使用安装在/etc/fonts

~/.fontconfig就我而言,不知何故在我不知情的情况下创建了一个空目录。将所有内容复制 /etc/fonts到这个目录解决了这个问题,删除~/.fontconfig目录也是如此。

于 2015-10-08T01:10:27.247 回答