Current status of libSVG module?

BlitzMax Forums/Brucey's Modules/Current status of libSVG module?

Russell(Posted 2013) [#1]
I see that libSVG is listed on Brucey's 'Definitive Modules List' and can be downloaded as a zip from http://brucey.net/programming/blitz/#bahlibsvg but is not listed/available in his svn trunk for bah.mod. I also looked inside the cairo source folder and found references to svg in there, but the docs for Cairo don't mention, as far as I can see, anything about svg. Is it still possible to load and draw svg objects with Cairo?

Has this libSVG just been absorbed into Cairo.mod and is no longer necessary as a separate lib? What's the deal?

Thanks in advance.

Russell


Brucey(Posted 2013) [#2]
Hello.

Loading is currently an issue. The "official" way to do it is via a library called librsvg. Although it is LGPL, it is built against glib, which would require all kinds of extra gtk-type libraries to function on Windows/OSX.
My libsvg module was based on some source that was part of an earlier version of Cairo. It works, but it doesn't support much of the svg standard stuff, so a lot of svg files don't render properly.

I don't currently have a fix for this.

If anyone, in the meantime, sees an open source library with such useful functionality that could be plugged into Cairo, I'm happy to have a look at it.


Russell(Posted 2013) [#3]
If Cairo doesn't natively load SVG files, are there other vector formats that it does support, such as PS (post script), AI (Adobe Illustrator), etc? SVG would be preferable, though, because it is a completely open standard.

The main reason I'm interested in this (and possibly some other people as well I'm guessing) is that I really like the vector drawing program 'Inkscape' (look into it people, if you've never heard of it: It is excellent!) and have lots of SVG files I've created with it (not to mention lots of ones pre-made that other people have made).

Anyway, I found SVGKit ( https://github.com/SVGKit/SVGKit ), but it appears to be for Cocoa/iOS only, but supports about 90% (according to the website) of the current SVG specification. This appears to be recent (2013).

This article ( http://tuxpaint.org/presentations/sdl_svg_svgopen2009_kendrick.pdf ) appears to show how to do it with libSDL, although it is from 2009 and I'm not sure if it's cross-platform. Probably, as SDL and Cairo are, which this method uses.

You know, I was just thinking: If Inkscape is open source, and it supports SVG loading/saving I wonder if it would be possible/allowable to use it or, more preferably, one of its libraries for SVG support?

Russell