how to change default font size for graphviz?

Fontsize is a graph attribute (as well as an edge and node attribute). Doxygen generates a dot file, so, e.g.,:

strict digraph {
                 graph [ bgcolor=lightgray, resolution=128, fontname=Arial, fontcolor=blue, 
                         fontsize=12 ];
                 node [ fontname=Arial, fontcolor=blue, fontsize=11];
                 edge [ fontname=Helvetica, fontcolor=red, fontsize=10 ];

                }

Specific settings will override generic ones; hence setting fontsize as a node attribute will override the fontsize set as a graph attribute (just for nodes though), and setting fontsize for specific nodes will override fontsize set for all nodes.

If you try what i have above and it does not seem to work, change the fontsize, search your entire dot file for ‘fontsize’ settings, remove them, and re-set fontsize as a node attribute.

Here is the complete graphviz attribute list.

Leave a Comment