icon2font2

2.0.3 • Public • Published

icon2font

icon2font is a simple tool to convert svg icon to multiple formats of fonts, include eot/ttf/woff.

Install:

npm install icon2font

Usage:

  1. use it with guide(it will show you how to use step by step): icon2font start

  2. use it by command(recommend use this when you have already know the parameters): icon2font -i <input icon direction> -o <output font direction> -n <your font name>

Parameter introduction:

  1. -i input icon file direction
  2. -o output font file direction
  3. -n convert font name

Use it in your project:

  1. <i class='change-icon-[type]' />

the content of type is the same name of your svg which you want to use

  1. import iconfont-list.css/.less in your page

you can find these two file in your output file

See the result:

You can see the font created example by opening the 'index.html' under your output file.

Readme

Keywords

Package Sidebar

Install

npm i icon2font2

Weekly Downloads

1

Version

2.0.3

License

ISC

Unpacked Size

15.9 kB

Total Files

11

Last publish

Collaborators

  • hardfist