How to use the fontmin.svgs2ttf function in fontmin

To help you get started, we’ve selected a few fontmin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github junmer / icon-font / source.js View on Github external
return fs.statSync(path).isFile();
    }
    catch (err) {
        return false;
    }
};

if (src.length > 1 && !isFile(src[src.length - 1])) {
    dest = src[src.length - 1];
    src.pop();
}

// start fontmin
new Fontmin()
    .src(src)
    .use(Fontmin.svgs2ttf(fmOpts.fontFamily, fmOpts))
    .use(Fontmin.ttf2eot(fmOpts))
    .use(Fontmin.ttf2woff(fmOpts))
    .use(Fontmin.ttf2svg(fmOpts))
    .use(Fontmin.css(fmOpts))
    .use(dump(fmOpts))
    .dest(dest || 'output')
    .run((err, files, stream) => {

        if (err) {
            log(err);
            process.exit(1);
        }

        files.forEach(file => {
            log(`created: ${file.path}`);
        });

fontmin

Minify font seamlessly, font subsetter, webfont (eot, woff, svg) converter.

MIT
Latest version published 1 month ago

Package Health Score

71 / 100
Full package analysis