Graphviz: change font for the whole graph?

后端 未结 3 1997
独厮守ぢ
独厮守ぢ 2021-01-31 13:05

I am wondering if I can define an alternative font for the whole graph.

...
digraph script_concept {
graph [layout=\"dot\",fontname=\"helvetica\"];
...
<         


        
3条回答
  •  后悔当初
    2021-01-31 13:47

    No, there is no other way.

    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"];
     ...
    }
    

提交回复
热议问题