iconvg icon indicating copy to clipboard operation
iconvg copied to clipboard

Q: Recommended in-browser IconVG decoder?

Open gojomo opened this issue 2 years ago • 1 comments

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!

gojomo avatar Apr 03 '22 22:04 gojomo

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.

nigeltao avatar Apr 05 '22 10:04 nigeltao