Use quadratic beziers for smoooooooooooooth curves #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's been bugging me for a while that certain icons seemed to be having their paths adjusted when being converted to a font. After seeing a few tweets mentioning the "sloppy" vectors gasp I finally looked into what the cause was.
The source files look great, and after some testing, the SVG font looked fine. With some helpful advice I learned that there are two types of beziers: cubic and quadratic. It seems TTF files need the quadratic bezier, but when designing icons in Illustrator, there's nothing stopping you from creating cubic ones. We use https://github.com/fontello/svg2ttf to do the SVG -> TTF conversion, which attempts to do the cubic -> quadratic math, but in some cases it doesn't quite preserve the shapes.
Essentially it comes down to this:
Having a smooth curve on each end of the arc is important. Without it, the curve bends strangely on the end with the curve, and meets the other edge with a sharp corner when viewed as a TTF.
I've gone through the icons and fixed all of the offending vectors I can find. Things look pretty crisp in the TTF now. If you happen to see any others, let me know.