Giter Club home page Giter Club logo

font-blast's Introduction

You can use font-blast to extract icons from any icon font - Font Awesome, Foundation, anything from Fontello etc. Font-blast will use the "super-font.svg " file to generate individual SVG/PNG files for each icon.

There are several reasons why you may want to split up the icon font:

  • Use the icons outside of web pages - so you can import individual icons as SVGs into Sketch, Illustrator, PowerPoint, or any other app to use for visual mockups/presentations.
  • Modify & repackage icons - you can change a specific icon to suit your taste, then repackage the font (with something like Font Squirrel)
  • Get high quality PNGs - high-quality PNGs with a transparent backgrounds of any or all icons in the font

Installation

Font-blast is light-weight and has relatively few dependencies. Font-blast does not require PhantomJS or any other binaries on the system, so it should work pretty much everywhere.

Note: PNG images are generated with the embedded batik-rasterizer, and you will need have java installed to do that (but it is not necessary for SVG generation).

$ npm install font-blast

Barebones usage

You can generate icons from the command line by called the script with two parameters: the SVG file of the font, and the directory where inidivual icons should be placed -

CLI

$ font-blast [svg-font-file] [destination-dir]
$ font-blast font-awesome.svg fa-icons/ 

Node

var fontBlast = require('font-blast');
fontBlast('font-awesome.svg', 'fa-icons');

Better Usage

Smarter filenames

Just using the SVG file it is impossible to tell what the icon represents. Most icon-fonts have a mapping table which gives a human-friendly name to each unicode symbol. See https://github.com/eugene1g/font-blast-examples

Verification

...

font-blast's People

Contributors

eugene1g avatar

Watchers

James Cloos avatar Matt Griffin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.