Graphviz: change font for the whole graph?

graphviz

Solution

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

Problem

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?

Original source