iconvg
iconvg copied to clipboard
Q: Recommended in-browser IconVG decoder?
Hi! Do you know of any usable work, or have any recommendations, for IconVG
decoding in the browser?
I'm thinking of something that'd be able to replace inline elements, like say <img src='data: image/x-iconvg;base64,iklWRwMLEVFRsbE1gVkzWYGBqTWFlTR9lX19NYV1NH11fW2I' />
, with the rendered image.
I suppose compiling @Hixie's contributed DART decoder to JS might be a fruitful approach – though of course supporting the current IconVG
format would be preferred.
Thanks!
I don't know of anything that's usable 'out of the box'.
Hixie's Dart decoder is a good place to start, but as you said, it needs upgrading to the latest file format version.
You could also try compiling the C code to WASM and writing a canvas backend (as opposed to Cairo or Skia).
Either approach would require a bit of work, though.