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

    2

    Version

    1.0.3

    License

    ISC

    Last publish

    Collaborators

    • lang
    • otakustay
    • leeight
    • luyuan
    • ksky521
    • justineo
    • errorrik
    • gdjinbo
    • ecomfe-admin
    • ecomfe-core
    • junmer