This library's focus on correctness is what made me realize how absurdly complex SVG rendering is.<p>They focus only on static SVG, and only on SVG 1 (though apparently they're working on SVG 2 support) and they still only manage to pass something like 90% of the tests.<p>Which is more than any of the popular browsers or SVG rendering libraries. I wouldn't be surprised if resvg were the most compliant SVG renderer in existence.<p>And that doesn't even take into account the <i>actually</i> complicated parts of SVG, like requiring an entire JavaScript interpreter for the <script> tags, which resvg rightfully excluded from its scope.<p>These decisions made sense for the web, I guess, where all of the pieces were already there. The browsers already had to handle native text rendering, JavaScript, etc. It seems like SVG became something like a common interface to the drawing primitives browsers had anyway. Plus JavaScript.<p>I'd like to see a much smaller, embeddable vector graphics format that doesn't require a whole browser to implement it.
I make use of a library in R to render SVG that uses Cairo to render to an intermediate (simplified) format, which looks a lot like what Resvg is doing with usvg. The advantage here seems to be that this is a much more compact library (fewer dependencies maybe?)<p>Does anyone know if rust plays well acting as the backend for R libraries?<p>How does this rendering/simplification compare with Cairo? I’m wondering if this is a fun summer project for some student!