nfroidure/gulp-iconfont

Issue with rotated SVGs

Closed this issue · 2 comments

I'm having some issues with rotated SVGs generated by Sketch. They appear fine in Finder, and upon inspection the generated code looks right as well. The issue occurs when I use the iconfont.

See screenshot:
screenshot
The rotated SVG is the one floating adrift on the left.

As a temporary solution, I've adjusted the transform property on the polygon so that it appears correctly rotated.

Do you have any ideas why this might be happening? 🤔

Apprently this issue can also be solved by flattening the SVG in Sketch before exporting it, which resets the rotation. At this point I'm not sure if there's any need for patching gulp-iconfont... 🙃

It is probably a https://github.com/nfroidure/svgicons2svgfont issue.

Maybe due to the order in which transformations are applyed.

If you could put the original failing icon and the one you manually modified by moving the rotation in an issue in the above project, it would give a chance to fix it.

The issue that gather transformation problems:
nfroidure/svgicons2svgfont#6