A tool to generate Font Icon according to SVG file
English | 简体中文
npm install iconfont-generate-tool
1、generate a node js filedemo.js
const path = require('path');
const IconFontGenerator = require('iconfont-generate-tool');
new IconFontGenerator({
svgPath: path.join(__dirname, './svgs/*.svg'),
outputDir: path.join(__dirname, './'),
fontName: 'demo-icon',
cssPrefix: 'test'
}).generate();
2、start
node demo.js
Type:String
svg icons file path. exp:path.join(__dirname, './svgs/*.svg')
Type:String
File output path.
Type:String
CSS file output path.
Type:String
Html file output path.
Type:String
JavaScript file output path.
Type:String
Font file output path.
Type:String
The font family name.
Type:String
CSS className prefix.
Type:String
JavaScript file content prefix.
Please refer tosvg2ttf