Chlumsky / msdfgen

Multi-channel signed distance field generator
MIT License
3.9k stars 404 forks source link

Incorrect rendering of SVG with internal path #188

Closed pgrAm closed 10 months ago

pgrAm commented 11 months ago

Hi I have been having some issues with some svg files that contain self instersecting/internal paths.

For example I used this svg with the latest version of the master branch (which contains the updated svg code)

simple

I ran the the tool with these arguments

msdfgen -svg simple.svg -autoframe -size 128 128 -testrender render.png 512 512

However the results were not as expected, as you can see there is no "A" embedded in the circle like in the SVG

render.png: render

output.png: output

Chlumsky commented 10 months ago

Thank you for reporting this. The issue was that the fill-rule attribute was not taken into consideration. This was fixed in f04dc6a. Keep in mind that like the previous improvements to the SVG parser, this will only work in the version with Skia.