[Bug] [GFUI] Cannot parse minified arc paths

Hi Glowforge,

I’ve noticed quite a few folks encountering this error recently:

which I’ve only seen after trying to use SVGs that I’ve optimized for size.

This got me wondering, what exactly is GFUI choking on?

I spent a few minutes debugging this to determine GFUI is not parsing the elliptical arc curve commands in a <path> command.

M 123 0 a 123 123 0 1 1 123 -123
ArcCleanWorks
This one works correctly in GFUI.

M123 0a123 123 0 1 1 123-123
ArcSomeWSRemovedWorks
This one has a little whitespace removed, as allowed by the spec:

https://www.w3.org/TR/SVG2/paths.html#PathDataGeneralInformation

Superfluous white space and separators (such as commas) may be eliminated; for instance, the following contains unnecessary spaces:
M 100 100 L 200 200
It may be expressed more compactly as:
M100 100L200 200

However this one, is also perfectly valid, and results in the aforementioned error in GFUI:

M123 0a123 123 0 11 123-123
ArcMoreWSRemoved-BROKE

This is a maximally stripped down version, that also breaks in GFUI:

M123 0a123 123 0 11123-123
ArcEvenMoreWSRemoved-BROKE

Now… all of these SVGs render correctly in browsers. Inkscape also handles them correctly.

GFUI does not. Adobe Illustrator does not.

Maybe fix your parse GF? Or maybe give a distinct error message for these problems, since it seems some more general browser cache issues often will result in the same error message - and at least for this error, the suggested clearing of cache or restarting GF is not going to do anything to help.

Cheers,
Josh

PS… I’d love a place to actual file nice bug reports against GF… this seems like the best place for now. Let me know if you’d prefer somewhere else.

11 Likes

You put it in the right place. Nice sleuthing!

3 Likes

Thank you for identifying this for our team, and for providing very detailed information including example SVGs! I’ll share this information with the team, along with your suggestion for a way to directly report bugs.

I’m going to close this thread. If you run into trouble again, or have other questions, please post a new topic here on the forum or email us at support@glowforge.com and we’ll be happy to help.