Have ideas to improve npm?Join in the discussion! »

    ttf2woff2
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/ttf2woff2 package

    4.0.3 • Public • Published

    ttf2woff2

    Convert TTF files to WOFF2 ones.

    GitHub license Coverage Status NPM version Dependency Status devDependency Status Package Quality

    This is a NodeJS wrapper for the Google WOFF2 project. If the C++ wrapper compilation fail, it fallbacks to an Emscripten build.

    Usage

    CLI

    Install ttf2woff2 globally, then:

    cat font.ttf | ttf2woff2 > font.woff2

    API

    var fs = require('fs');
    var ttf2woff2 = require('ttf2woff2');
    
    var input = fs.readFileSync('font.ttf');
    
    fs.writeFileSync('font.woff2', ttf2woff2(input));

    Contributing

    Feel free to push your code if you agree with publishing under the MIT license.

    Authors

    License

    MIT

    Install

    npm i ttf2woff2

    DownloadsWeekly Downloads

    114,657

    Version

    4.0.3

    License

    MIT

    Unpacked Size

    4.4 MB

    Total Files

    75

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar