cppfw / svgren

:camera: SVG rendering library in C++
MIT License
206 stars 41 forks source link

Add support for Skia, AGG or any other rendering engine with a more permissive license #70

Closed JaimeIvanCervantes closed 4 years ago

JaimeIvanCervantes commented 4 years ago

Have you considered adding support for a different rendering engine with a more permissive license perhaps? I know that it is a lot of work, but adding support for Skia, for example, would make all the difference in the world ;). I considered working on this and opening a PR, but it's difficult to find the time. If you, or anyone else is interested in adding support for Skia, I might be able to help out. Amazing library btw!

igagis commented 4 years ago

Yes, would be nice to eliminate dependency with LGPL license, but at the time of active coding the cairo library was easier to use for me. And now I also have a lack of time to add support for Skia, at least at the moment. Maybe some day...

As for AGG, as far as I know, it is not anymore maintained, so I don't consider it as an option.

JaimeIvanCervantes commented 4 years ago

is there any update on adding support for Skia? I got this Skia renderer from svgpp working a while back, that might serve as a reference here.

I love to work with svgdom but I would say, the single one thing that is preventing me from using svgren, is the Cairo license. At least for me, this is even more important than adding support for CSS styles, but it might be interesting to hear what other users have to say...

igagis commented 4 years ago

blocked by https://bugs.chromium.org/p/skia/issues/detail?id=10341&q=&can=4

JaimeIvanCervantes commented 4 years ago

thanks for looking into adding support for Skia. How do you repro? Do you try to build Skia without skparagraph?

igagis commented 4 years ago

There is a command line in the bug report I posted a link to. To start porting svgren to Skia I first need to pack the skia for all the systems that I support, currently skia is not packed even for linux (debian/ubuntu). So, I'm trying to build Skia with minimum dependencies as I don't need text drawing etc, just basic vector stuff. And I got this error so far.

spiralsam commented 4 years ago

agg last update was on 2020-03-12. commit was version bump to 2.7.0. The forum says the version continues same license as 2.4 It appears to be OS independent.

igagis commented 4 years ago

this looks interesting, I'll have a closer look at it. Possibly I will switch to using AGG then.

JaimeIvanCervantes commented 4 years ago

agreed, thanks for the info @spiralsam, it looks like they forked from agg 2.4 (since 2.5 updated the license from MIT to GPL), see discussion here: https://sourceforge.net/p/agg/discussion/118993/thread/99fb7419de/?limit=25#d46a

@igagis I still think that Skia is much more mature, and has many more rendering capabilities than agg though. This is the render engine that is used in Chrome, is fast, supports multiple output formats, and is very well tested :)

igagis commented 4 years ago

I agree, that skia is more maintained. However, the issue I mentioned above still does not seem to be resolved, though it does not look like some big problem, just a build system configuration bug.

igagis commented 4 years ago

Port to AGG is almost done, so looks like skia will remain unused by svgren, at least for now.

igagis commented 4 years ago

svgren version 0.5.0 is now using AGG instead of Cairo.