GNOME Bugzilla – Bug 655718
Font size problems in SVG (with Firefox)
Last modified: 2011-12-17 14:18:04 UTC
SVG files generated by Dia have incorrect font size compared to PNG - it seems like that it's rendered in "points", while it must be rendered in "pixels". If you change it manually for example from "font-size:11.2" to "font-size:11.2px", the font size becomes equal to like it is in PNG. You can check it on any example from Dia distribution and Firefox 4 or 5.
Dia has three SVG exporters, only one seems to produce problems with Firexfox font size selection. Although the described work-around indeed seems to work I dont think it is the right solution. Similar issues were discussed before (e.g.: http://mail.gnome.org/archives/dia-list/2007-September/msg00023.html ). Although Firefox SVG support improced since 2007 I still hesitate to add specific "fixes" for it. If I understand the SVG specification correctly Dia is producing the correct value - without unit in the current user coordinate system, see: http://www.w3.org/TR/SVG11/text.html#FontSizeProperty
Created attachment 193013 [details] SVG created from render-test.dia with standard DiaSvgRenderer
Created attachment 193014 [details] Above SVG rendered by Firefox 5 on Windows Note: the font sizes look rigt with other SVG renderers, e.g. Sodipodi, Inkscape, DesignerX5
Instead of closing as WONTFIX I'm leaving it open for further reference. But IMO the bug should be reported in the Firefox bugzilla.
Oh, thanks! Opera 10.63 also renders this SVG incorrectly. Firefox 5, Chrome - OK. I agree that 'px' is a very ugly hack :)
Actually the bug was reported and analyzed in the Firefox bugzilla and Robert Longdon proposed an acceptable solution. See: http://git.gnome.org/browse/dia/commit/?h=dia-0-97&id=80d8d5ec9e9668ea3fbb979fdcf3bf1d7cee57ac I'm going to close this bug as a duplicate of the later bug 665648 because that's the bug referenced with the fix. *** This bug has been marked as a duplicate of bug 665648 ***