When setting global node setting (node [...,fontsize="8",...]), the results of "twopi -Tsvg file.dot > file.svg" has a font-size setting of 14.00 instead of 8. The results with -Tpng, -Tgif, etc. seem ok. Setting global value for edge label fontsize works fine. In the example below, twopi correctly sets a font-size of 7.00, which was set as a default for edges. So at best, the behavior is inconsistent.
I hope it's not pilot error...
here is output of file below (twopi -Tsvg file.dot > file.svg):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!-- Generated by twopi version 1.8.8 (Sun Aug 11 07:18:50 EDT 2002)
For user: (wjro) Title: xxx Pages: 1 -->
<svg width="131px" height="50px"
xmlns="http://www.w3.org/2000/svg">
<g id="graph0" class="graph" style="font-family:Times-Roman;font-size:14.00;">
<title>xxx</title>
<polygon style="fill:#ffffff;stroke:#ffffff;" points="1,49 1,1 130,1 130,49 1,49"/>
<g id="node1" class="node"><title>N1</title>
<polygon style="fill:#990099;stroke:#990099;" points="115,16 75,16 75,34 115,34 115,16"/>
<text text-anchor="middle" x="95" y="28" style="font-family:Verdana;fill:#ffffff;">NODE 1</text>
</g>
<g id="node2" class="node"><title>N2</title>
<polygon style="fill:#00aa00;stroke:#00aa00;" points="58,16 16,16 16,34 58,34 58,16"/>
<text text-anchor="middle" x="37" y="28" style="font-family:Verdana;fill:#000000;">NODE 2</text>
</g>
<g id="edge2" class="edge"><title>N1--N2</title>
<path style="fill:none;stroke:#ff0000;" d="M75,25C69,25 64,25 58,25"/>
<text text-anchor="middle" x="66" y="20" style="font-family:Verdana;font-size:7.00;fill:#000000;">EDGE 1</text>
</g>
</g>
</svg>
graph xxx {
color="#000000";
bgcolor="#ffffff";
center="N1";
overlap="true";
ranksep=0.8;
// this should set font size for all nodes:
node [fontsize="8",fontname="Verdana",shape="box",style="filled",height="0.25",width="0.5"];
edge [fontsize="7",fontname="Verdana",fontcolor="#000000"];
N1 [label="NODE 1",color="#990099",fontcolor="#ffffff"];
N2 [label="NODE 2",color="#00aa00",fontcolor="#000000"];
N1 -- N2 [label="EDGE 1",color="#ff0000"];
}
Comments:
[erg] See also bug 229
Fix:
I looked briefly at svggen.c and saw that the fontsz gets multiplied
by some scale factor. That's as far as I got in 2 minutes.
Owner: ellson
Status: Fixed (23 Jan 2003)