-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Conversion alters shapes #24
Comments
Interestingly, these erratic paths seem to happen on arcs that only have a bezier curve on one end. Paths that have two curved ends seem to render nicely. |
Alright, I've confirmed that ensuring that each side of a point has a bezier curve will smooth the points, so it's an issue of how the icon is drawn. I can solve this issue myself, but since the svg looks different the the ttf, I'll let you decide if that's a bug. |
TTF understands only quadratic beziers. Svg allows cubic. cubic -> quad approximation algorythm is simplified, and can have deviations on edge cases. Usually, when you draw glyphs in font editor, it saves data with quadratic beziers, and you will never see this problem. With current convertor i'd recommend to add more points. Or if anyone wish, he can rewrite this https://github.com/fontello/svg2ttf/blob/master/lib/math.js#L39-L75 |
Closed in flavour of #25. PS. I have no plans to fix it myself, but if anyone wish - there are link to article with all details about math. |
Thanks for the explanation @puzrin. I always learn a lot from opening issues on your repos 😃 |
@cameronmcefee FYI, after ages... fixed :) |
🎉 Awesome! |
Given the source:
The result is this:
The issue appears to happen when converting from svg font -> ttf. I tested this by switching the font-face declaration to only use the svg font, which looks great.
I don't notice this issue in Fontello icons (which I presume use this lib), so I'm not sure why I'm experiencing this.
Reference:
https://github.com/github/octicons/blob/master/svg/link.svg
http://octicons.github.com/icon/link/
The text was updated successfully, but these errors were encountered: