Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including icon-font-generator with all npm packages installed. Try it out:

icon-font-generator lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("icon-font-generator/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

icon-font-generator v1.1.1

Easy-to-use, pre-configured cli tool to generate webfont icon kits from a bunch of .svg files



Easy-to-use, pre-configured cli tool to generate webfont icon kits from a bunch of .svg files


This cli utility is ment to make webfont icon sets creation from the command line really simple - It wraps and pre-configures webfonts-generator, but allows for some degree of customisation.

It also does a couple extra things such as creating a .json file containing the icons to unicode characters map, which may be later used in styles, templates, etc..


npm install -g icon-font-generator


Quick usage
icon-font-generator my-icons/*.svg -o icon-dist
Cli params
Usage   : icon-font-generator [ svg-icons-glob ] -o [ output-dir ] [ options ]
Example : icon-font-generator src/*.svg -o dist

  -o, --out        Output icon font set files to <out> directory
  -n, --name       Name to use for generated fonts and files (Default: icons)
  -s, --silent     Do not produce output logs other than errors (Default: false)
  -f, --fontspath  Relative path to fonts directory to use in output files (Default: ./)
  -c, --css        Generate CSS file if true (Default: true)
  --csspath        CSS output path (Defaults to <out>/<name>.css)
  --csstp          CSS handlebars template path (Optional)
  --html           Generate HTML preview file if true (Default: true)
  --htmlpath       HTML output path (Defaults to <out>/<name>.html)
  --types          Font types - (Defaults to 'svg, ttf, woff, woff2, eot')
  --htmtp          HTML handlebars template path (Optional)
  -j, --json       Generate JSON map file if true (Default: true)
  --jsonpath       JSON output path (Defaults to <out>/<name>.json)
  -p, --prefix     CSS classname prefix for icons (Default: icon)
  -t, --tag        CSS base selector for icons (Default: i)  --normalize      Normalize icons sizes (Default: false)
  --round          Setup SVG rounding (Default: 10e12)
  --descent        Offset applied to the baseline (Default: 0)
  --mono           Make font monospace (Default: false)
  --height         Fixed font height value
  --center         Center font horizontally


Copyright (c) 2014 Ltd. - Released under the MIT license


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free