Chlumsky / msdfgen

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

Failure to import SVG file with empty initial <g> element #185

Closed treacherousfiend closed 1 year ago

treacherousfiend commented 1 year ago

When importing an SVG file with multiple <g> elements, if the uppermost one has no path, msdfgen will fail to import with the "Failed to load shape from SVG file." error. These files do import correctly into Inkscape and Krita, and you can reproduce an erroring SVG file yourself with Inkscape by creating an empty layer which is a parent for other layers which have paths in them image

Alternatively, I have 2 error inducing SVG files below, one made via a blender plugin to convert curves into SVG, and one that is made in Inkscape using the method above blenderpluginsvg inkscapesvg

Chlumsky commented 1 year ago

I am not able to reproduce this problem. Are you using the latest version?

treacherousfiend commented 1 year ago

I'm using the latest release, should I try to build the current commit?

Chlumsky commented 1 year ago

Yes, SVG parser was updated after the 1.10 release.

treacherousfiend commented 1 year ago

that worked, thanks!