21
我使用doxygen + graphviz來記錄我的代碼。 graphviz在生成圖像方面做得很好。如何更改graphviz的默認字體大小?
有沒有辦法改變graphviz的默認字體大小?默認值是14,但我想用12代替。
它是一個真正的痛苦來改變字體大小個別元素,例如,節點,子圖,邊......等
UPDATE:
僅供參考這裏是我使用的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
我試過這個,但它不適合我。 :( – chronodekar 2009-12-31 03:18:43
自從我研究這個以來已經有一段時間了,我認爲我最終放棄了。但是,你的更新看起來可行,而且缺少更好的東西,我將其標記爲答案 – chronodekar 2010-02-25 05:39:13
嘗試將雙引號括起來字體名稱?這對我有效 – 2013-02-21 15:54:44