Skip to content

ecomfe/edp-build-iconfont

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published