Newton's Preposterous Miscalculation
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

edp-build-iconfont

1.0.3 • Public • Published

edp-build-iconfont

edp-build iconfont with fontmin, generate iconfont from svgs.

Usage

edp-build-config.js:

var IconProcessor = require('edp-build-iconfont');

exports.getProcessors = function () {

    var iconProcessor = new IconProcessor({
        files: 'src/svg/*.svg',             // svg path
        fontName: 'font-food',              // font name
        dest: 'src/font'                    // dest path
    });

    return {
        'iconfont': [iconProcessor]
    };

});

Options

config fmOptions as fontmin options

var iconProcessor = new IconProcessor({
    fmOptions: {
        adjust: {
            leftSideBearing: 0,
            rightSideBearing: 0,
            ajdustToEmBox: true,
            ajdustToEmPadding: 0
        },
        startCode: 0xe001
    }
});

Related

NPM

install

npm i edp-build-iconfont

Downloadsweekly downloads

7

version

1.0.3

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability