Page 1 of 1

Text Offset Probem with SVG 1.1 Specification Example

Posted: 2011-11-08T10:19:12-07:00
by djhreg
Just getting started with SVG coding and ImageMagik and have been delighted so far with the quick, precise and easy rendering of SVG geometric shapes to GIF. However, I just ran into my first problem when I tried to render text. After getting some strange behavior, I decided to just try rendering an example from the SVG 1.1 standard itself.

I picked the example "NewCoordSys" from the section of the specification on translation of coordidates here => http://www.w3.org/TR/SVG/coords.html

This should produce two pieces of text, one rotated slightly and one offset.

I cut and pasted the SVG code into the file X1.SVG.

From the Windows command line, I typed:

convert X1.SVG X1.GIF

It ran instantly with no errors. However, when I look at the GIF, the text is not in the right place. In both coordinate systems (two are shown) it is about 3 ems down and 3 ems to the right of where it should be. This problem is quite similar to the problem I was having in my own piece of SVG.

I installed from ImageMagick-6.7.3-2-Q16-windows-dll.exe (recommended default). I happen to be using Windows XP, but the behavior is the same on my Windows 7 machine.

Is there some configuration step I need to take or additional command line option I need to include?

Thanks!

David Hetherington
Austin, Texas, USA

Re: Text Offset Probem with SVG 1.1 Specification Example

Posted: 2011-11-08T10:32:54-07:00
by fmw42
I am not an expert on SVG nor am I a windows user. But you might try installing the RSVG delegate library (if that is possible on windows) rather than using the built-in SVG.

convert -list format
...
SVG SVG rw+ Scalable Vector Graphics (RSVG 2.34.1)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (RSVG 2.34.1)
...


Strange! I tried that example and all I get with RSVG is a blank white image. IM 6.7.3.4 Q16 Mac OSX Tiger

Re: Text Offset Probem with SVG 1.1 Specification Example

Posted: 2011-11-08T10:44:21-07:00
by magick
We can reproduce the problem you posted and will have a patch within a few days. Thanks.

Re: Text Offset Probem with SVG 1.1 Specification Example

Posted: 2012-01-31T10:51:29-07:00
by davezachry
I was curious if there was any resolution to this issue.

I have the same issue, I believe. I have an SVG file that has text placed at a specific place and looks correct in an image editor. But when I convert it to a PNG, the text is not positioned correctly.

I am using the latest version of Imagemagic.

Re: Text Offset Probem with SVG 1.1 Specification Example

Posted: 2012-01-31T11:23:47-07:00
by magick
We're using ImageMagick 6.7.5.0 and the text appears to render properly. We'll need you to define "the text is not positioned correctly" and we'll investigate further.

Re: Text Offset Probem with SVG 1.1 Specification Example

Posted: 2012-01-31T13:25:38-07:00
by djhreg
After upgrading to ImageMagick-6.7.4-7-Q16 on 19 January 2012, my original problem was fixed. The testcase extracted from the SVG specification now formats correctly.

Thanks,

David Hetherington