Open yisibl opened 2 years ago
Thanks for the issue report. skia-pathops (python bindings to Skia PathOps module) is used to do boolean path intersection to clip shapes to the viewbox rectangle. Sometimes PathOps reports an error as in this case, unfortunately it doesn't tell us what exactly was wrong.. It's currently a bit of a black box for us. We have had similar issues (e.g. https://github.com/fonttools/fonttools/issues/2363) which we have reported upstream (see https://bugs.chromium.org/p/skia/issues/detail?id=11958). Maybe this is another example of the same issue, or a new one altogether.
This is how your SVG looks like, looks quite plain to me (I don't see how pathops would fail on it):
We could try to reproduce the error by only using Skia C++ API and write an interactive "fiddle" like this https://fiddle.skia.org/c/897a5a7d11e721faac930f67d7598557
and then send a bug to upstream skia and hope it'll get fixed.
@yisibl I get the same PathOpsError: operation did not succeed
if I try to run picosvg --clip_to_viewbox using the latest Skia that includes the bug fix from https://bugs.chromium.org/p/skia/issues/detail?id=11958#c16
Sad, let's continue to wait for the improvement upstream.
I imported this SVG into Glyphs 3 and it does have a strange anchor segment at the top.
Exporting the ttf font from Glyphs shows up in Chrome as follows:
Adobe Illustrator automatically corrects the top anchor point:
hm, that's maybe what is tripping pathops.
picosvg --clip_to_viewbox test.svg