Using other svg delegate
Using other svg delegate
I am using The ImageMagick that comes with Red Hat 6.7. It is picking up the librsvg shared object to convert svg material. The verison of rsvg installed on the rh6 machine, as well as the latest version, fail to convert the text on the page properly. I am able to view this thorugh gwenview and convert it through ksvgtopng properly.
Since the latest version is bad and it would be a pain to have the fix patched and deployed, is there a way to change the delegate? I tried used the delegate.xml file, but I noticed the librsvg-2.so was being picked, and the delegates.xml wasn't even being opened.
Since the latest version is bad and it would be a pain to have the fix patched and deployed, is there a way to change the delegate? I tried used the delegate.xml file, but I noticed the librsvg-2.so was being picked, and the delegates.xml wasn't even being opened.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Using other svg delegate
I am not an svg expert, but if you install Inkscape, I believe that IM will use that as its first choice. I understand that Inkscape does better than RSVG, which does better than IM MSVG.
Perhaps you can provide your exact command and the svg file, so others can test.
You can override the RSVG delegate with the internal MSVG by doing
Though generally RSVG is better than MSVG.
Also you might identify the version of SVG and Imagemagick.
will tell you what version of Imagemagick is being used.
will tell you which version of RSVG is being used. For example:
SVG SVG rw+ Scalable Vector Graphics (RSVG 2.40.12)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (RSVG 2.40.12)
Perhaps you can provide your exact command and the svg file, so others can test.
You can override the RSVG delegate with the internal MSVG by doing
Code: Select all
convert MSVG:somefile.svg result.suffix
Also you might identify the version of SVG and Imagemagick.
Code: Select all
convert -version
Code: Select all
convert -list format
SVG SVG rw+ Scalable Vector Graphics (RSVG 2.40.12)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (RSVG 2.40.12)
Re: Using other svg delegate
All of my conversions are done in the api, not in the tools. the simple observation is
display my.svg
Where there are several fonts being used and various UTF8 characters.
display -version
Version: ImageMagick 6.7.2-7 2015-02-27 Q16 http://www.imagemagick.org
so my tool links in libMagickCore.so.5.0.0
I installed inkscape, but it doesn't work either. Only gwenview and ksvgtopng completely.
I was hoping this could be overwritten by the delegates file, so I could use a tool that works.
display my.svg
Where there are several fonts being used and various UTF8 characters.
display -version
Version: ImageMagick 6.7.2-7 2015-02-27 Q16 http://www.imagemagick.org
so my tool links in libMagickCore.so.5.0.0
I installed inkscape, but it doesn't work either. Only gwenview and ksvgtopng completely.
I was hoping this could be overwritten by the delegates file, so I could use a tool that works.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Using other svg delegate
Perhaps you should post your svg file so others can test with it or examine it. You also have not provided your version of RSVG.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Using other svg delegate
What does Inkscape say? Any error message?tsdineen wrote:I installed inkscape, but it doesn't work either.
Perhaps your SVG file is bad.
snibgo's IM pages: im.snibgo.com
Re: Using other svg delegate
No, it didn't covert the unicode character properly.
Re: Using other svg delegate
I would like to note, this file views properly with gwenview, firefox, display (if converted using ksvgtopng).
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Using other svg delegate
I do not think we can help much more without having the file to test. If it is proprietary, can you provide some other svg file that has the same issue?
Re: Using other svg delegate
You can find the sample svg here.
ftp://ftp.sas.com/outgoing/ImageMagick/ansg011.svg
Note: this is only a problem with the rsvg product.
The
Z=31.6
should be like
̿X=31.6
Which is a Combining Double Overline + Capital X. You may have issues seeing this, if you Linux box doesn't have the correct fonts.
ftp://ftp.sas.com/outgoing/ImageMagick/ansg011.svg
Note: this is only a problem with the rsvg product.
The
Z=31.6
should be like
̿X=31.6
Which is a Combining Double Overline + Capital X. You may have issues seeing this, if you Linux box doesn't have the correct fonts.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Using other svg delegate
Inkscape v0.91 complains:
I can't find "font-face-src" in the SVG 1.1 standard.
Inkscape displays "Z=31.6".
The SVG code refers to fonts that I don't have on my system. If it uses glyphs that aren't in my default font, they will display incorrectly (obviously).
Code: Select all
** (inkscape.exe:3624): WARNING **: unknown type: svg:font-face-src
Inkscape displays "Z=31.6".
The SVG code refers to fonts that I don't have on my system. If it uses glyphs that aren't in my default font, they will display incorrectly (obviously).
snibgo's IM pages: im.snibgo.com
Re: Using other svg delegate
Sorry, I'm not sure what font that is, but it is part of our product.
Here is what happens when I run rsvg-convert
ftp://ftp.sas.com/outgoing/ImageMagick/rsvg.png
and when I run ksvgtopng
ftp://ftp.sas.com/outgoing/ImageMagick/ksvgto.png
As you can see, the ksvgtopng is picking up the font, rsvg and inkview do not.
Using the latest rsvg on Fedora 23, v2.40.15, finds the double over bar character correctly, but doesn't convert the Greek alpha in the upper right corner of the graph.
This is clearly a rsvg issue, but my request is how do I override the use of rsvg in ImageMagick shared libraries to something in the delegates.xml?
Here is what happens when I run rsvg-convert
ftp://ftp.sas.com/outgoing/ImageMagick/rsvg.png
and when I run ksvgtopng
ftp://ftp.sas.com/outgoing/ImageMagick/ksvgto.png
As you can see, the ksvgtopng is picking up the font, rsvg and inkview do not.
Using the latest rsvg on Fedora 23, v2.40.15, finds the double over bar character correctly, but doesn't convert the Greek alpha in the upper right corner of the graph.
This is clearly a rsvg issue, but my request is how do I override the use of rsvg in ImageMagick shared libraries to something in the delegates.xml?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Using other svg delegate
You can create your own entries in delegates.xml. Better, create your own personal delegates.xml ("-debug all" will tell you where IM tries to find it). This entry could use a prefix of, say, "KSVG". Then, when you run ...tsdineen wrote:how do I override the use of rsvg in ImageMagick shared libraries to something in the delegates.xml?
Code: Select all
convert KSVG:in.svg out.png
snibgo's IM pages: im.snibgo.com
Re: Using other svg delegate
I don't use convert, so how do you make this work through the api?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Using other svg delegate
The same delegates mechanism works for both. If you can use convert, it will quickly tell you where it searches for delegates.xml. Otherwise, you should read the documentation.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Using other svg delegate
If you don't use convert, what are you using and how does that relate to Imagemagick? Do you mean you are using one of the API's rather than command line?