How can I fix Inkscape's rendering of this file?
Hello!
I am writing a web app that exports SVGs. One such SVG is attached. Though it renders properly in web browsers including Chrome and Firefox, Inkscape renders it poorly.
* Firefox rendering (correct): http://i.imgur.com/vvla9QX.png * Inkscape rendering (incorrect): http://i.imgur.com/s8f2aXs.png. Note that the numerical axis tick labels are offset to improper locations. Additionally, the document size is too small to contain the entirety of the graphic. * Batik rendering (slightly incorrect): http://i.imgur.com/xFFqFMs.png. For reference, I tried Batik. It renders the SVG better than Inkscape, but the numerical axis tick labels on the bottom ("Subject") axis are too high, even though those on the top ("Query") axis are correct.
How can I change the SVG so Inkscape will render it properly?
Thanks!
Jeff
-----Original Message----- From: Jeff Winterpants [mailto:micand7@...12...] Sent: 26 August 2014 16:54 To: inkscape-user@lists.sourceforge.net Subject: [Inkscape-user] How can I fix Inkscape's rendering of this file?
Hello!
I am writing a web app that exports SVGs. One such SVG is attached. Though it renders properly in web browsers including Chrome and Firefox, Inkscape
renders it
poorly.
- Firefox rendering (correct): http://i.imgur.com/vvla9QX.png
- Inkscape rendering (incorrect): http://i.imgur.com/s8f2aXs.png. Note that
the
numerical axis tick labels are offset to improper locations. Additionally, the document size is too small to contain the entirety of the graphic.
- Batik rendering (slightly incorrect): http://i.imgur.com/xFFqFMs.png. For
reference, I tried Batik. It renders the SVG better than Inkscape, but the
numerical
axis tick labels on the bottom ("Subject") axis are too high, even though
those on the
top ("Query") axis are correct.
How can I change the SVG so Inkscape will render it properly?
You can inspect the SVG using a text editor like Notepad.
This should allow you to confirm if you are really writing outside the document.
I suspect the Inkscape rendering is correct - it's normally the Gold Standard.
But you won't want to know that ;-)
Paul
On 2014-08-26 17:54 , Jeff Winterpants wrote:
I am writing a web app that exports SVGs. One such SVG is attached. Though it renders properly in web browsers including Chrome and Firefox, Inkscape renders it poorly.
- Firefox rendering (correct): http://i.imgur.com/vvla9QX.png
- Inkscape rendering (incorrect): http://i.imgur.com/s8f2aXs.png. Note that the numerical axis tick labels are offset to improper locations. Additionally, the document size is too small to contain the entirety of the graphic.
- Batik rendering (slightly incorrect): http://i.imgur.com/xFFqFMs.png. For reference, I tried Batik. It renders the SVG better than Inkscape, but the numerical axis tick labels on the bottom ("Subject") axis are too high, even though those on the top ("Query") axis are correct.
How can I change the SVG so Inkscape will render it properly?
Probably related to - Bug #168845 “<text> position attributes should handle relative units” https://bugs.launchpad.net/inkscape/+bug/168845 - Bug #262528 “Problem with <tspan> element and attribute dy” https://bugs.launchpad.net/inkscape/+bug/262528
(lack of support for relative units like 'em' for <text> and <tspan> positioning in Inkscape)
hth, V
On Tuesday, August 26, 2014 10:56:18 AM, su_v <suv-sf@...16...> wrote:
On 2014-08-26 17:54 , Jeff Winterpants wrote:
I am writing a web app that exports SVGs. One such SVG is attached. Though it renders properly in web browsers including Chrome and Firefox, Inkscape renders it poorly.
- Firefox rendering (correct): http://i.imgur.com/vvla9QX.png
- Inkscape rendering (incorrect): http://i.imgur.com/s8f2aXs.png. Note that the numerical axis tick labels are offset to improper locations. Additionally, the document size is too small to contain the entirety of the graphic.
- Batik rendering (slightly incorrect): http://i.imgur.com/xFFqFMs.png. For reference, I tried Batik. It renders the SVG better than Inkscape, but the numerical axis tick labels on the bottom ("Subject") axis are too high, even though those on the top ("Query") axis are correct.
How can I change the SVG so Inkscape will render it properly?
Probably related to
- Bug #168845 “<text> position attributes should handle relative unitsâ€
> https://bugs.launchpad.net/inkscape/+bug/168845
- Bug #262528 “Problem with <tspan> element and attribute dyâ€
> https://bugs.launchpad.net/inkscape/+bug/262528
(lack of support for relative units like 'em' for <text> and <tspan> positioning in Inkscape) hth, V
Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Thank you! I fixed the issue by changing all em dimensions to the equivalent px values, and by specifying the position of text elements via the x and y attributes rather than dx and dy.
Jeff
participants (3)
-
Jeff Winterpants
-
Paul A. Bristow
-
su_v