Graphviz: change font for the whole graph?

后端 未结 3 2065
独厮守ぢ
独厮守ぢ 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:56

    Not sure if this is a recent update, but you can change these at the command-line level using the -G, -E and -N attribute flags. That is, the following works for me:

    $ dot -Tpng -Nfontname=Roboto -Nfontsize=10 \
        -Efontname=Roboto -Efontsize=10 \
        tree.dot > tree.png
    

提交回复
热议问题