odyniec/icon-font-to-png — pull request #1 by djfpaagman (2014-07-15 19:10:10+00:00)
Title: Render icons in the top left corner

I used this script (and font-awesome-to-png in the past) to render the icons for use in [Balsamiq](http://balsamiq.com/), see [my repo](https://github.com/djfpaagman/font-awesome-balsamiq).

There was [a problem where some icons were cut off](https://github.com/djfpaagman/font-awesome-balsamiq/pull/3/files) on the sides, so I rerendered them with this script and almost succeeded, although there were still some icons being cut off, see the image below on the left (this is the `arrow-right` icon), the bottom has a slice cut off.

![betterscalingdiff](https://cloud.githubusercontent.com/assets/170034/3589925/d11f6d9e-0c52-11e4-90f3-cb4d4f011368.png)

After fiddling around with the script I managed to generate all icons like they should, as shown on the right.

The command I used to generate generate both icons is: `python icon_font_to_png.py --size 128 --scale auto fontawesome-webfont.ttf font-awesome.css arrow-right`.

Not sure why it didn't work properly with your original code, but this seems a bit more failsafe. Unfortunately my Python knowledge is bare and I can't seem to get the tests running, so that's why I'm making this pull request. Any help is appreciated, hopefully this is also helpful to you.