5.0.0 • Published 1 year ago
ttf2woff2 v5.0.0
ttf2woff2
Convert TTF files to WOFF2 ones.
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
On Windows without cat
, use (in PowerShell):
Start-Process -NoNewWindow -Wait ttf2woff2.cmd -RedirectStandardInput font.ttf -RedirectStandardOutput font.woff2
# OR
start-process -nnw -wait ttf2woff2.cmd -rsi font.ttf -rso 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
5.0.0
1 year ago
4.0.5
2 years ago
4.0.4
3 years ago
4.0.3
3 years ago
4.0.2
3 years ago
4.0.1
3 years ago
4.0.0
3 years ago
3.0.0
5 years ago
2.0.3
8 years ago
2.0.2
8 years ago
2.0.1
9 years ago
2.0.0
9 years ago
1.2.3
9 years ago
1.2.2
9 years ago
1.2.1
9 years ago
1.2.0
9 years ago
1.1.1
9 years ago
1.1.0
9 years ago
1.0.2
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago