Hacker News new | ask | show | jobs
by wolfspider 2276 days ago
I’m surprised no one mentioned canvg: https://canvg.github.io/canvg/demo/index.html

If using CSS with SVG is important then it’s actually better to use a backend with a library like librsvg (e.g. Cairo) then run node-canvas on top of it like automattic does. Even Inkscape has problems with CSS in SVG files. CSS in browsers is subjective because nowadays they might be using an style that doesn’t have a straightforward approach that can be rasterized. I haven’t had much luck with rasterizing SVG styles past CSS2 spec.