Hi,
I have the following svg file "in.svg":
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="500" height="200" 'viewBox="0 0 500 200">
<text x="0" y="0" font-size="14">A Á E É</text>
</svg>
In command line: "convert in.svg out.png"
The output file does not correctly represent the special characters of the text.
how can I solve that?
Thank you very much to all!
Convert SVG to PNG with special characters
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert SVG to PNG with special characters
What version of IM? On what platform? What delegate is rendering your SVG? What output do you get?
snibgo's IM pages: im.snibgo.com
Re: Convert SVG to PNG with special characters
Hi,
The version of IM is:
Version: ImageMagick 6.9.4-9 Q16 i386 2016-06-21 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC
Delegates (built-in): bzlib freetype gslib jng jpeg png ps tiff xml zlib
The platform is Linux (hosting with STRATO).
The output is: AA E A
Characters without accents work well, but those with accents do not show them or show them wrong.
What do you mean by "Which delegate is your SVG representing?"
Thanks!
The version of IM is:
Version: ImageMagick 6.9.4-9 Q16 i386 2016-06-21 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC
Delegates (built-in): bzlib freetype gslib jng jpeg png ps tiff xml zlib
The platform is Linux (hosting with STRATO).
The output is: AA E A
Characters without accents work well, but those with accents do not show them or show them wrong.
What do you mean by "Which delegate is your SVG representing?"
Thanks!
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert SVG to PNG with special characters
On SVG rendering, see http://www.imagemagick.org/Usage/draw/#svg
Does Inkscape correctly process the SVG? If it does, then I suggest you use that as the IM delegate. If it doesn't, there's a problem with your SVG file.
Does Inkscape correctly process the SVG? If it does, then I suggest you use that as the IM delegate. If it doesn't, there's a problem with your SVG file.
snibgo's IM pages: im.snibgo.com
Re: Convert SVG to PNG with special characters
When i put: convert -list delegate | grep svg
The result is:
cdr => "uniconvertor' '%i' '%o.svg'; /usr/bin/mv '%o.svg' '%o"
cgm => "uniconvertor' '%i' '%o.svg'; /usr/bin/mv '%o.svg' '%o"
dot => "dot' -Tsvg '%i' -o '%o"
dxf => "uniconvertor' '%i' '%o.svg'; /usr/bin/mv '%o.svg' '%o"
fig => "uniconvertor' '%i' '%o.svg'; /usr/bin/mv '%o.svg' '%o"
svg => "rsvg-convert' -o '%o' '%i"
How can i use "rsvg-convert' ?
The result is:
cdr => "uniconvertor' '%i' '%o.svg'; /usr/bin/mv '%o.svg' '%o"
cgm => "uniconvertor' '%i' '%o.svg'; /usr/bin/mv '%o.svg' '%o"
dot => "dot' -Tsvg '%i' -o '%o"
dxf => "uniconvertor' '%i' '%o.svg'; /usr/bin/mv '%o.svg' '%o"
fig => "uniconvertor' '%i' '%o.svg'; /usr/bin/mv '%o.svg' '%o"
svg => "rsvg-convert' -o '%o' '%i"
How can i use "rsvg-convert' ?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert SVG to PNG with special characters
The last line says that the external delegate for *.svg files is a program called rsvg-convert. If you don't have that program, it won't be used.
I suggest you install Inkscape, which is (as far as I know) the most complete rasterizer of SVG.
I suggest you install Inkscape, which is (as far as I know) the most complete rasterizer of SVG.
snibgo's IM pages: im.snibgo.com