Chlumsky/msdfgen

SVG file

nautist opened this issue · 5 comments

It does not seem to work if one curve is created inside of the other as a hole. A shape read from a font that looks like an 'O' is perfectly fine, but if a similar shape is read as a path from an SVG file, it looks like a filled circle. Is that a problem with winding?
Thanks

Can you post the file?

Sure (hope this works)

svgtest4.zip

Yes, it seems like a winding issue. Also, there is some weird stuff in the top left corner. In any case, Skia interprets the shape in this format as filled, so I would lean towards not a bug.

I made this shape as a test in Affinity Designer (using two rounded rectangles and a boolean operation and exported it in svg. In Designer and in several different browsers, the inner curve is interpreted as a hole inside the outer curve. Maybe they don't care about winding.

I think I got it. This svg file is saved using fill-rule=evenodd, and every other contour has to be reversed to get the hole inside the outer contour.