1.0.0 • Published 3 years ago

woff2otf v1.0.0

Weekly downloads
10
License
GPL-3.0
Repository
github
Last release
3 years ago

woff2otf

NPM version License CI

Convert WOFF font files to OTF using NodeJS.

Installation

npm install woff2otf

Usage

CLI

woff2otf fontToConvert.woff outputFont.otf

WARNING: if the output file exists will be overwritten!

NodeJS

const fs = require('fs');
const woff2otf = require('woff2otf');

const woffFileBuffer = fs.readFileSync('path/to/file.woff');
const otfFileBuffer = woff2otf(woffFileBuffer);
fs.writeFileSync('path/to/file.otf', otfFileBuffer);

Thanks to

@hanikesn because this program is a port from Python of hanikesn/woff2otf