-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Icons not generated properly #73
Comments
The problem sits in this RegExp I think: https://github.com/nfroidure/svgicons2svgfont/blob/master/src/index.js#L60 |
Hey @nfroidure |
Hum, right. The problem may be that the width/height should be computed from the width/height and viewBow attribute somewhere there: https://github.com/nfroidure/svgicons2svgfont/blob/master/src/index.js#L186-L210 |
@nfroidure I'm thinking over what it should be. |
So, I think I got the issue Instead if you're considering width and height attributes at all, then that can be used as scale factor and not for clipping which is why the size of icon generated is coming more than size of actual icon. Like, in this case, actual font is (24,24) (since starting is 0,0) but it's actual width,height is 48,48 which means, icon will be clipped as 24,24(as per viewbox) but scaled to 48,48(as per width height attributes) I think, my explanation is correct bcoz when I open this .svg in inkscape, it opens correctly to the size 48x48. And when I modify values of svg to We can discuss about modifying once you think it's fine. |
Was actually a duplicate of #9 |
I'm taking icons from materials website of 42dp.
My gulp task is below:
As the documentation says,
But the fonts generated aren't proper. font
And my expecting fonts should look like obviously not with extra space because I'm giving
normalize: true
andfontHeight: 1001
This below I got from iconmoon website and this is how I am expecting
Linking to issue
The text was updated successfully, but these errors were encountered: