Photoshop: Generator SVG export doesn't support boolean shape operators

  • 2
  • Problem
  • Updated 1 year ago
  • (Edited)
This seems to be a regression in the new SVGOMG export module.

Here's the source file. Each shape is made out of two rectangles with varying boolean modes (add, subtract, exclude, intersect).



This is what Generator exports by default:


Setting "svgomg-enabled": false in the Generator config produces the correct output:


I realize that merging the shapes fixes the output, but that is not an acceptable solution.
Photo of Philipp Antoni

Philipp Antoni

  • 33 Posts
  • 3 Reply Likes

Posted 1 year ago

  • 2
Photo of Tom Attix

Tom Attix, Employee

  • 27 Posts
  • 12 Reply Likes
Philip-
Does it look the same when you open the .svg file in Chrome (not all SVG parsers are created equal). Also, you say regression, do you mean it used to work differently?

Thanks
-Tom Attix
Photo of Philipp Antoni

Philipp Antoni

  • 33 Posts
  • 3 Reply Likes
Yeah, same in Chrome.

And yeah, this was not an issue before SVGOMG.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14049 Posts
  • 1735 Reply Likes
Would you mind posting your source file?
Photo of Philipp Antoni

Philipp Antoni

  • 33 Posts
  • 3 Reply Likes
FWIW this is not a recent regression, it's been around for at least 6-9 months.
Photo of Jaroslav Bereza

Jaroslav Bereza

  • 763 Posts
  • 157 Reply Likes
I have also this problem often... so I usually merge paths of shape into one path.
Photo of Tom Attix

Tom Attix, Employee

  • 27 Posts
  • 12 Reply Likes
There is a (sort of) work around. Use Copy SVG from the layer's contextual menu. This copies the SVG code of the current layer to the clipboard, where it can be pasted to your SVG text file. I realize this isn't quite as convenient and I'm a little mystified as to why they don't use the same code, but that's where we're at at the moment. The second image is the Chrome rendering of the Copy SVG code.
Photo of Philipp Antoni

Philipp Antoni

  • 33 Posts
  • 3 Reply Likes
Thanks, that's good to know for small projects.