-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with Icons containing circles: some circles will be filled, although they shouldn't #135
Comments
Hi @scrapix - can you share your SVG? I would imagine there's a transparent fill circle somewhere in there :) |
Hi @tancredi , thanks for the quick reply. Sure, here are the SVGs: |
I've double-checked the svg in Adobe illustrator and in Atom. There seems to be no additional object withing the SVG. Also interesting is, that all circles are copies of one object. So it's unclear why some get a fill, while others not. :-O |
Really strange - are you sure it's the same exact version of the SVG that was used for that reported test? |
Super strange indeed! Super sure, that I'm using the same SVG. Here is the whole directory with the source Icons + generated font: Note |
Same on ubuntu 20.04 |
I've had this issue with similar icons. The icons look correct on macOS Catalina, however are filled on macOS Big Sur. |
I'm having the exact same issue |
Same identical issue on Catalina... is there any workaround on this? |
I've been encountering this issue for a number of years, even in the previous icon-font-generator version, and I believe it does come down to how Figma is exporting SVGs. A simple square with outline strokes: Generates this SVG code in Figma: <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 2H2V14H14V2ZM1 1V15H15V1H1Z" fill="white"/>
</svg> While the same icon in Illustrator is exported as: <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 2V14H2V2H14ZM15 1H1V15H15V1Z" fill="white"/>
</svg> The main difference is that Figma is using Figma <path d="M14 2H2V14H14V2ZM1 1V15H15V1H1Z" /> Illustrator <path d="M14 2V14H2V2H14ZM15 1H1V15H15V1Z" /> I filled this on the Figma forum in case anyone wants to upvote |
same issue with |
I learned that there is a "Fill Rule Editor" Figma plugin that allows you to toggle the fill rules and properly export svgs to be used with font tools like fantasticon. I've been using this as an alternative and it's working well. |
Fill Rule Editor has not worked for me. But I've re-created the icon in Vectornator software on MacOS. It exported without any issue now. |
This package works like a charm https://www.npmjs.com/package/svg-reorient and fixed my output. After running it against the files all |
Icon creation + SVG export tool: figma
OS: OS X BigSur
Browsers: Safari, Firefox, Chrome
fantasticon version: 1.1.1
Problem
no matter how I create Icons, some circles get filled unexpectedly
Icon Creation in 4 different ways
Result
The text was updated successfully, but these errors were encountered: