After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 655718 - Font size problems in SVG (with Firefox)
Font size problems in SVG (with Firefox)
Status: RESOLVED DUPLICATE of bug 665648
Product: dia
Classification: Other
Component: exports
0.97.x
Other Linux
: Normal enhancement
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2011-08-01 12:45 UTC by Vitaliy Filippov
Modified: 2011-12-17 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SVG created from render-test.dia with standard DiaSvgRenderer (41.07 KB, image/svg+xml)
2011-08-01 20:11 UTC, Hans Breuer
Details
Above SVG rendered by Firefox 5 on Windows (84.91 KB, image/png)
2011-08-01 20:17 UTC, Hans Breuer
Details

Description Vitaliy Filippov 2011-08-01 12:45:27 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.
Comment 1 Hans Breuer 2011-08-01 20:09:29 UTC
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
Comment 2 Hans Breuer 2011-08-01 20:11:17 UTC
Created attachment 193013 [details]
SVG created from render-test.dia with standard DiaSvgRenderer
Comment 3 Hans Breuer 2011-08-01 20:17:28 UTC
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
Comment 4 Hans Breuer 2011-08-01 20:22:40 UTC
Instead of closing as WONTFIX I'm leaving it open for further reference. 
But IMO the bug should be reported in the Firefox bugzilla.
Comment 5 Vitaliy Filippov 2011-08-02 11:11:31 UTC
Oh, thanks!
Opera 10.63 also renders this SVG incorrectly. Firefox 5, Chrome - OK.
I agree that 'px' is a very ugly hack :)
Comment 6 Hans Breuer 2011-12-17 14:18:04 UTC
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 ***