All Projects → malcolmyu → iconfont-builder

malcolmyu / iconfont-builder

Licence: other
a tool to build fonts via svg

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to iconfont-builder

remax-iconfont-cli
在RemaxJs框架中使用iconfont图标,支持多端,支持多色彩,不依赖字体。
Stars: ✭ 30 (+87.5%)
Mutual labels:  iconfont
react-iconfont-cli
转换iconfont图标为React标准组件,不依赖字体,支持多色彩
Stars: ✭ 58 (+262.5%)
Mutual labels:  iconfont
EasyTextView
🌈 🍀支持Java和Xml设置Shape、IconFont、IconFont+String、Span等具有丰富Api的TextView
Stars: ✭ 71 (+343.75%)
Mutual labels:  iconfont
Coreui Icons
CoreUI Free Icons - Premium designed free icon set with marks in SVG, Webfont and raster formats
Stars: ✭ 1,813 (+11231.25%)
Mutual labels:  iconfont
vue-iconfont
更优雅地使用 Iconfont.cn,同时支持 font-class 引入和 symbol 引入。
Stars: ✭ 27 (+68.75%)
Mutual labels:  iconfont
iconfont-desktop
Desktop client for https://www.iconfont.cn/
Stars: ✭ 18 (+12.5%)
Mutual labels:  iconfont
icons
Simple, minimal line, and clean icon pack in vector formats — free for public use.
Stars: ✭ 24 (+50%)
Mutual labels:  iconfont
web-icons
It's a full suite of popular web icons for easy scalable vector graphics on websites.
Stars: ✭ 30 (+87.5%)
Mutual labels:  iconfont

iconfont-builder

Build Status npm

中文版

Introduction

Iconfont-builder is a node.js package for providing a middleware that create some font files.

Installation (via npm)

$ npm i --save iconfont-builder

Usage

Simple Usage

var builder = require('iconfont-builder');
var path = require('path');

var options = {
    icons: [
        {
            name: 'www-font-o',
            file: 'abc.svg',
            codepoint: 61441
        }
    ],
    src: path.join(__dirname, 'src'),
    fontName: 'iconfont',
    descent: 0,
    dest: path.join(__dirname, 'dest')
};

builder(options)
    .then().catch();

List of options

icons

Type: Array<Object>

Example:

{
    name: 'www-font-o', // className of icon
    file: 'abc.svg',    // fileName of icon
    codepoint: 61441    // unicode of icon
}

writeFiles

Type: Boolean

Default: true

It is possible to not create font files but get the attribute d of each icon svg. The attribute d contains all paths' information of an icon, which can be use to draw a svg icon.

readFiles

Type: Boolean

Default: true

You can only use attribute d to create font files! If this param is false, the Object in param icons should have attribute d.

fontName

Type: String

Default: 'iconfont'

Name of font and font files.

startCodePoint

Type: Number

Default: 0xF000

Start of font's unicode in DEC(e.g. 61441) or HEX(e.g. 0xF001). When passing options without icons, builder will use startCodePoint as the first unicode of font icon, and the unicode of each remaining icons will increased by one in order.

src

Type: String

Default: '.'

Directory of source svg font files.

dest

Type: String

Directory for generated font files.

descent

Type: Number

Default: 0

The font descent. It's useful to fix the font baseline yourself.

Warning: The descent is a positive value!

Author

missmiss

malcolmyu

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].