Skip to content
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

Very simple svg with empty circle ends up being filled #589

Open
dahei opened this issue Jul 19, 2024 · 1 comment
Open

Very simple svg with empty circle ends up being filled #589

dahei opened this issue Jul 19, 2024 · 1 comment

Comments

@dahei
Copy link

dahei commented Jul 19, 2024

I have this simple svg:

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
    <circle cx="12" cy="12.0006" r="9.05303" stroke="#303A4D" stroke-width="1.89394"/>
</svg>

File: global-distribution

after running it through fantasticon it ends up like this:

CleanShot 2024-07-19 at 16 15 30@2x

Where it actually should not be filled and look like that:

CleanShot 2024-07-19 at 16 16 03@2x

Any idea what I'm doing wrong here?

@screaming-snake-case
Copy link

This happens because you have provided a circle shape with a stroke.
Fantasticon ignores all strokes and uses the shape as a character.
Also as discussed in #537, you should not provide the svg with a height and a width.

In your case this means you should change the stroke of the circle into a single shape.
If you do this it should work fine.

I have already modified your svg for you:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
    <path d="M12,22C6.5,22,2,17.5,2,12C2,6.5,6.5,2,12,2c5.5,0,10,4.5,10,10C22,17.5,17.5,22,12,22z M12,3.9 c-4.5,0-8.1,3.6-8.1,8.1c0,4.5,3.6,8.1,8.1,8.1s8.1-3.6,8.1-8.1C20.1,7.5,16.5,3.9,12,3.9z"/>
</svg>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants