Number: 827
Title: SVG attribute in text element font-size:xx.yy; not valid to Firefox 1.5
Submitter: Todd Bruner
Date: Tue Nov 22 18:47:09 2005
Subsys: Dot
Version: 2.6
System: x86-Linux-Debian Linux testing 2.6.8 kernel
Severity: major
Problem:
dot -T svg test.dot > test.svg

test.svg has text elements for the node like:


<text text-anchor="middle" x="32" y="26" style="font-size:10.00;">xyz</text>

note style="font-size:10.00;" Firefox's 1.5 javascript debugger complains that font-size attribute is not correct and drops it, resulting in the wrong font-size being displayed.

Replacing 10.00 with 10px with a text editor, and then reloading into firefox fixes the problem (you get the 10px font-size you desired.)
Input:

digraph test {
     graph [ ratio = fill, bgcolor="#ffffff"];
     node  [ label = "N" ];
     graph [ bb="0,0,337,322" ];
     node1 [ label = "XYZ", color="#ff0000", fontsize="10px", shape=ellipse];
     node2 [ label = "abc", color="#00ff00", fontsize="10px", shape=ellipse];
     node1 -> node2 [label = "xyz->abc"];
}
Comments:
[ellson] Latest* versions of graphviz have dropped the use of style="...font-size..." since, as I understand it, the use of "style" implies CSS.

The font sizes are now fixed to the drawing, which is good. Previously the font sizes were getting modified by firefox user-preferences, independently of the rest of the drawing, which makes no sense for graphviz drawings.

So, I don't think bug#827 is applicable any more.

[robert.simpson] I was using the 'current stable release' downloaded approx 2 weeks ago (2.20 I think). The latest development snapshot fixes the bug by replacing font-size:8.00 with font-size="8.00". That works ok in Firefox.
Owner: ellson
Status: Fixed