JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 282505
  • Score
    100M100P100Q177706F
  • License MIT

Convert TTF files to WOFF2 ones.

Package Exports

  • ttf2woff2
  • ttf2woff2/jssrc

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ttf2woff2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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