Inkscape Text Rendering Strangeness...
Hello!
I know it's been quite some time since I wrote to this list, but I've been monitoring it and reading up on what's going on. I just used the latest autopackage nightly to get up to date with Inkscape-0.39 and I'm impressed, with both Inkscape and Autopackage!
Lately I've been quite busy making working on a project of mine called SVG-Utils, which is basically a collection of scripts to manipulate SVG files, and a Python library to manipulate and create SVG files on the fly. I've yet to make an official release, but we are in the bug testing phase as I type this. You can read more about the project on this site: http://programmer-art.org/?page=svg-utils
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.
textest.svg is the original textest-bad.svg is the output from my svggrayscale.py script textest-bad2.svg is textest-bad.svg saved through inkscape textest-bad3.svg is textest-bad2.svg with the spacing fixed through Inkscape's XML editor
Thanks, Daniel G. Taylor ________________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193
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 Inkscape.
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="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.
-mental
participants (3)
-
bulia byak
-
Daniel Taylor
-
MenTaLguY