Graphviz:更改整个图形的字体? [英] Graphviz: change font for the whole graph?
本文介绍了Graphviz:更改整个图形的字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否可以为整个图形定义替代字体.
I am wondering if I can define an alternative font for the whole graph.
...
digraph script_concept {
graph [layout="dot",fontname="helvetica"];
...
According to this 1 older post the fontname atribute can be defined only separately:
节点和边不继承图形的字体,您需要指定 他们分别
Nodes and edges don't inherit the font of the graph, you need to specify them separately
还有其他方法,如何全局定义字体?
Is there any other way, how to define the font globally?
推荐答案
不,没有其他方法.
就像您链接的论坛帖子一样,您必须在graphviz文件的开头分别定义默认值(如其他属性):
As in the forum post you linked, you have to define the default values separately (like the other attributes) at the beginning of your graphviz file:
digraph g {
graph [fontname = "helvetica"];
node [fontname = "helvetica"];
edge [fontname = "helvetica"];
...
}
这篇关于Graphviz:更改整个图形的字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文