Graphviz - dot因fontconfig错误而失败

时间:2015-10-08 01:10:27

标签: graphviz dot fontconfig

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

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

git rm <FILE(S)>

但是检查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 ,三个fontconfig文件的位置:

/etc/fonts

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

fontconfig命令/etc/fonts/fonts.conf /etc/fonts/fonts.dtd /etc/fonts/conf.d 也提供了一个非空的已安装字体列表。

1 个答案:

答案 0 :(得分:0)

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

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