noft

Build Status

noft is a tool to extract svg icons from icon fonts and generate helpers to render the icons in different web frameworks. noft automates

Getting Started

Noft makes extensive use of the font-blast node package. To use this tool it is expected that you have installed Node and NPM. See https://www.npmjs.com/get-npm if that is not the case. Then you need to install font-blast. This may require the following steps:

# If your project does not yet have NPMs package.json file present
$ npm init

# Install font-blast
$ npm install font-blast --save-dev

Motivation

Several of our applications made use of font icon libraries either as part of larger frontend frameworks (i.e. Bootstrap) or using individual libraries (i.e. Font Awesome). Often our applications would use an extremely small subset of the icons from these sources. The application would also combine it with custom icon fonts constructed on websites such as FlatIcon. As a result our applications would have 100s or 1000s of unused css classes and unused glyphs. For frameworks like GWT this also necessitated 1000s of lines of unused java code for CssResource bundles. All of this slowed down development time and increased the size of assets downloaded by web clients. In some cases we were forced to manually remove unused css classes, font glyphs and java methods but it was labour intensive (and thus expensive), somewhat error prone and extremely boring.

Looking towards the architecture of future applications we came across several articles about moving from icon fonts to svg. In particular the article"Making the Switch Away from Icon Fonts to SVG: Converting Font Icons to SVG" by Sara Soueidan and the article "Delivering Octicons with SVG" from GitHub about their move away from font icons motivated us to make the switch. Unwilling to lose the investment in our current icons we created this tool to help automate the conversion of our current icons to helpers that injected icons where we needed it.

TODO

Here are a bunch of TODO notes. They are just pointers to the authors about work not yet done and may not be decipherable to outside parties.