3.0.1 • Published 6 years ago

@tfoxy/ttf2woff2 v3.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

ttf2woff2

Convert TTF files to WOFF2.

NPM version Build status Dependency Status devDependency Status Coverage Status Code Climate

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.

Stats

NPM NPM