> One interesting bug that has cropped up occurs when I use the library to output some text and tspan elements. As an example I have included the original file, the output of svggrayscale.py, Inkscape's saved version of the output, and a fixed version of Inkscape's output. It seems to be adding extra text XML elements (tabs, newlines, spaces) when loaded in Inkscape, so the text displays with an offset to the right. At first I thought it was a problem with SVG-Utils, but librsvg 2.7.2 renders the output from svggrayscale correctly, so now I'm not sure. I hope you could look into this issue and help me to understand why it is happening.
Use Batik and/or Adobe SVG plugin as reference renderers. In this case
they both display the same as Inkscape, so the problem is not with
Your script adds newlines between <text> and <tspan>. Within <text>,
whitespace is meaningful and is displayed as text. Note that Inkscape,
when creating <text>, does not leave any extra whitespace inside.
On Sat, 2004-07-03 at 13:10, bulia byak wrote:
> Your script adds newlines between <text> and <tspan>. Within <text>,
> whitespace is meaningful and is displayed as text. Note that Inkscape,
> when creating <text>, does not leave any extra whitespace inside.
Also note that these documents all specify xml:space=3D"preserve", which
affects the way SVG interprets whitespace ("preserve" causes text to be
treated in the same way as HTML's <pre> tag does).
As far as I can tell, in this example Inkscape is correct -- if librsvg
is not respecting xml:space, then that is a librsvg bug.