cppfw / svgren

:camera: SVG rendering library in C++
MIT License
206 stars 41 forks source link

Wrong SVG rendering #66

Closed lucdion closed 5 years ago

lucdion commented 5 years ago

Hi, the following SVG rendering is not right. It should be a white "6" number inside a black circle.

Result:

image

Expected Result:

image

SVG in GIMP:

image

color.svg.zip

Thanks

igagis commented 5 years ago

Thanks for reporting the bug! Is this sample SVG generated by some program or is it handwritten?

I found that it specifies arc in path and it combines 3 of its parameters which are large-arc-flag, sweep-flag, x to a string 100, so it is large-arc-flag=1, sweep-flag=0, x=0 and svgdom parser does not like that, it expects spaces between the numbers, like 1 0 0. It does not look like it is according to the svg spec, but for example Firefox renders the image correctly. So I'll try to fix it in svgdom as well.

igagis commented 5 years ago

The bug is fixed in svgdom version 0.3.25. Please test and close the bug.

lucdion commented 5 years ago

Thanks for the quick fix! The file has been generated using SVG optimize.