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

mis-shaped results #107

Closed
manlyman29 opened this issue May 22, 2024 · 6 comments
Closed

mis-shaped results #107

manlyman29 opened this issue May 22, 2024 · 6 comments

Comments

@manlyman29
Copy link

I used this library to correct svg fill rule and make it ready to be converted to a typeface without filling the strokes.
Although it seems to have fixed the fill rule issue, the results seem mis-shaped as can be seen below:
Screenshot 2024-05-22 at 11 12 27

It draws the less complex ones correctly but with some added complexity like these two icons, it draws additional shapes.

The icons I used as input were from popular icon pack https://ionic.io/ionicons which I assumes rules out the improper input format possibility.

@Ghustavh97
Copy link
Contributor

Hi, thanks for the issue.

  1. The resolution for the image you provided is too low and I cannot see exactly what's going on. A side by side comparison with what the expected icon should look like would be great too.
  2. I need reproduction code, mainly what code, icons and steps you used to get the results so I can try them out on my side.
  3. Try to increase and play around with traceResolution in the options object parameter, maybe that will fix the issue. The default traceResolution is 600.
SVGFixer('directory/containing/svgs', 'directory/to-store/fixed-svgs', { traceResolution: 1200 });

@manlyman29
Copy link
Author

manlyman29 commented May 22, 2024

@Ghustavh97 I appreciate the response,
I tried the traceResolution but it resulted the same, this is side-by-side of the expected and actual result:

compare

And regarding the reproduction steps you can use below svg:
people-outline

I used the CLI command:
oslllo-svg-fixer -d ./ -s ./ --tr 1200
And then I used flutter_icon_generator to generate the font. The culprit here could very well be the flutter_icon_generator as well. I will dig more onto this tomorrow. On first efforts I tried enabling and disabling ignore_shapes option but that didn't generate a proper result either.

@Ghustavh97
Copy link
Contributor

Try to convert the icons using https://fontello.com/ and see if you get the same issues.

@manlyman29
Copy link
Author

@Ghustavh97 fontello gives below error:
`If image looks not as expected please convert to compound path manually. See wiki.

Skipped tags and attributes: stroke,fill-rule,fill`

@manlyman29
Copy link
Author

icomoon.io worked and it has a flutter class generator too. Thanks for the amazing work here.

@Ghustavh97
Copy link
Contributor

No problem. Thanks for posting the links and info to your solution.

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