Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Somewhat relatedly: http://fontello.com. Helps you generate your own icon fonts using a smaller selection of icons instead of using the entire Font Awesome library, which can be up to 253kB depending on your browser.

There's a great gem for using it with rails [1], a cli [2] and grunt task [2].

[1] https://github.com/railslove/fontello_rails_converter

[2] https://github.com/paulyoung/fontello-cli

[3] https://github.com/jubalm/grunt-fontello



I personally prefer IcoMoon which generally has a lot more options and their font builder (for custom glyphs) works much better.


We've started using fontello recently. We use some custom svg assets in addition to the icon font sets. I wrote a ~100 line python script that manages interactions with fontello. It'll open a browser with our config file, let you make changes, then download and store the updated fontello assets mostly from the command line. I highly recommend doing something like this if you get on board the fontello train.


What does that buy you that using something like gulp-iconfont https://github.com/nfroidure/gulp-iconfont doesn't?


That project doesn't seem to integrate with Fontello at all.


Right, the point would be to not require a bunch of scripts to tie into an online service to generate a font. Instead you just do it all locally at build time.


You can also make subsets with any font on Google Fonts, using the text= parameter e.g. https://fonts.googleapis.com/css?family=Creepster&text=JAVSC...


Is there a similar library that can use local assets? I'd prefer to remove an external website dependency from my build process if possible.


I had that same question some time ago. I found that Google uses Python bindings[1] for fontforge, but it had that dependency on fontforge. So I opted for a Python-based solution called fonttools[2] instead, and it works pretty well. It comes with a utility called pyftsubset which you can use like so:

    pyftsubset FontAwesome.otf U+f0{2c,9e,99}
This creates a file called FontAwesome.otf.subset that has the selected glyphs. The FontAwesome site has the Unicode value on each icon page.

[1] https://code.google.com/p/googlefontdirectory/source/browse/...

[2] https://github.com/behdad/fonttools/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: