github/octicons — pull request #9 by cameronmcefee (2014-06-18 02:19:52+00:00)
Title: Use quadratic beziers for smoooooooooooooth curves

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.

![](https://cloud.githubusercontent.com/assets/72919/3295462/cc0a8c56-f5c0-11e3-80af-044c56e07529.png)

The source files look great, and after some testing, the SVG font looked fine. With some [helpful advice](https://github.com/fontello/svg2ttf/issues/24) 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:

![why](https://cloud.githubusercontent.com/assets/72919/3308951/57815c24-f68e-11e3-9771-979dd7dc25d4.png)

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.