I'm using ImageMagick-6.7.3-7 and Ghostscript 9.0.4.
My svg-file looks like this:
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<svg version="1.1" x="0px" y="0px" width="250px" height="200px" viewBox="0 0 250 200" enable-background="new 0 0 250 200" space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="mch">
<g id="eingang_passagen">
<rect x="167.402" y="0.158" fill="none" width="42.522" height="19.843"/>
<text transform="matrix(1 0 0 1 171.3022 7.4577)" fill="#FF0000" font-size="10">Passage </text>
<text transform="matrix(1 0 0 1 176.1074 19.4577)" fill="#FF0000" font-size="10">Hall 5</text>
</g>
<g id="booth_outlines">
<polygon fill="#00FFFF" points="124.882,20.112 82.363,20.112 82.363,20 20,20 20,122.047 82.363,122.047 82.363,48.346 124.882,48.346 "/>
</g>
<g id="booths">
<text transform="matrix(1 0 0 1 22.0004 25.6042)" fill="#FF0000" font-size="4">A27</text>
</g>
</g>
</svg>
convert "test.svg" "test.png"
all text items have the wrong position, outside the image.
Convert creates a temp-file with (just a part with the text from the 'booths'-group)
Code: Select all
affine 1 0 0 1 22.0004 25.6042
fill '#FF0000'
font-size 4
text 167.402,0.158 'A27'
After debugging the file 'coders\svg.c' I found at line 2405 following code:
Code: Select all
(void) FormatLocaleFile(svg_info->file,"text %g,%g '%s'\n",
svg_info->bounds.x,svg_info->bounds.y,text);
Alex