Skip to content

ArtCraft/Icon-Font-Generator-CLI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icon Font Generator CLI

This command line tool lets you convert svg image files under the source folder to webfont (eot, svg, ttf, woff and woff2) with 2-layer icon support

This tool is built on top of Fontello. Forked from Fontello-Offline-CLI.

Usage

$ node icon-font-generator-cli --version
$ node icon-font-generator-cli --help
$ node icon-font-generator-cli -s "src/path" -n thefontname -a "font author" -o "output/path"
$ node icon-font-generator-cli -c conf.json -w

Font development

md [project_name]
cd [project_name]
npm init -y
npm i -D ArtCraft/Icon-Font-Generator-CLI
md _icons
touch conf.json

conf.json

{
  "name": "icon",
  "src": "_icons",
  "output": "_output",
  "preview_size": 24,
  "default_size": 24,
  "author": "Unknown"
}

and add following to package.json

  ...
  "scripts": {
    "watch": "node node_modules/icon-font-generator-cli -c conf.json -w",
    "build": "node node_modules/icon-font-generator-cli -c conf.json"
  },
  ....

put svg files under _icons folder

and run npm run watch

This will regenerate a font and open a preview page. And each time you change something in _icons folder font going to be regenerated and preview reloaded.

Enjoy.

About

Offline command line interface for Fontello

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 71.5%
  • Pug 25.3%
  • Smarty 3.2%