memononen / nanosvg

Simple stupid SVG parser
zlib License
1.68k stars 355 forks source link

nanosvg run against w3.org test suite #53

Open kristianlm opened 8 years ago

kristianlm commented 8 years ago

What an amazing accomplishment, @memononen! I'm looking forward to experiment with embedded SVG-files in my prototype games instead of PNGs.

I made your example2.c into something that can be used from the command-line (see this issue), and I ran it across all the svg sample files from w2.org like this:

$ gcc -lm example2.c -o nsvg -I ../src
$ find -name "*.svg" | while read F ; do ./nsvg "$F" ; done

I was really surprised how accurate NanoSvg really was! Among the 204 examples, I found just a couple of problems:

Apart from those, they all render beautifully!

I don't have time to investigate, but I though I'd mention these minor problems just in case. Keep up the good work!

kristianlm commented 8 years ago

I missed one!

svg.svg doesn't look like a star: svg svg

Probably because of xlink:href. Leaving just for reference. I don't know how important supporting this would be for the use-case of prototype game icons.

memononen commented 8 years ago

Thanks for checking those out!

Another set I have been thinking of checking is http://game-icons.net/

X-Ryl669 commented 7 years ago

YingYang is fixed by code in #88. I'm creating a PR for it.