我使用 doxygen + graphviz 来记录我的代码。graphviz 在生成图像方面做得很好。
有没有办法改变graphviz的默认字体大小?默认值为 14,但我想改用 12。
更改单个元素(如节点、子图、边......等)的字体大小真的很痛苦。
更新:
这里的参考是我在 doxygen 中使用的代码,(当然,文本字段已重命名)
@dot
strict digraph {
node [shape = box, fontsize = 12];
subgraph cluster_main {
fontsize = 12;
shape = box;
label = "main";
subgraph cluster_main_common {
fontsize = 12;
shape = box;
label = "common";
subgraph cluster_main_common_source {
fontsize = 12;
shape = box;
label = "source"
subgraph cluster_file1 {
fontsize = 12;
shape = box;
label = "file1.c";
gSystem [label = "var1" URL = "\ref var1"];
}
subgraph cluster_file2 {
fontsize = 12;
shape = box;
label = "file2.c";
gCard [label = "var2" URL = "\ref var2"];
}
subgraph cluster_file3 {
fontsize = 12;
shape = box;
label = "file3.c";
gPwrSupply [label = "var3" URL = "\ref var3"];
}
}
}
subgraph cluster_main_docs {
fontsize = 12;
shape = box;
label = "docs";
subgraph cluster_main_docs_features {
fontsize = 12;
shape = box;
label = "features";
subgraph cluster_main_docs_features_source {
fontsize = 12;
shape = box;
label = "source"
subgraph cluster_file4 {
fontsize = 12;
shape = box;
label = "file4.c";
deviceInfo [label = "var4" URL = "\ref var4"];
}
}
}
}
}
}
@enddot