Open alerque opened 3 years ago
have you considered using ThorVG?
It's a very compact graphics lib written in C++. For now we support C++ and C APIs. We really care about the performance. We are developing the lib intensively and are very responsive to any potential issues :)
You can find more details here: https://github.com/Samsung/thorvg
No I haven't. Never even heard of it. Are there Lua bindings anywhere? It wouldn't be terribly hard to make our own but it's not my favorite chore -;) Frankly I'd be more interested in a Rust library if we do migrate to something else (since we're looking at it for other reasons already) but I'll keep an eye on this option too.
For now we don't have neither lua nor rust bindings, although we're considering the latter. We are also open for suggestions :)
@mgrudzinska
have you considered using ThorVG?
From a quick test with the viewer, as well as browsing the documentation, it seems
why not Skia
Thanks for the research @Omikhleia. I think you're right we really want to focus on vector output here, so basically need a SVG→Postscript , not an SVG renderer.
@ctrlcctrlv My only experience with Skia is the nightmare that it is to build packages for it since it is so tightly tied in to the Chrome sources. To my knowledge there is no Lua wrapper project available, although I see there are some sort of Lua bindings upstream now, something I was not aware of. That definitely makes it something we should consider since not only is the SVG handling robust (and even because of the ubiquity in browsers, even it's mistakes are often tolerated), but it also would give us handling for several other vector formats to boot.
Look into this: https://github.com/iongion/lunavg
See comments in #1097 about the vendored C code we have in the repo now.
Long term a Rust library for dealing with SVG might be better, but even if we stick with nanosvg, using a Lua wrapper through a Luarocks dependency would probably be better architecture.