https://github.com/mondeja/woff2otf
WOFF to OTF converter for NodeJS
https://github.com/mondeja/woff2otf
Last synced: 6 months ago
JSON representation
WOFF to OTF converter for NodeJS
- Host: GitHub
- URL: https://github.com/mondeja/woff2otf
- Owner: mondeja
- License: bsd-3-clause
- Created: 2021-02-07T02:58:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-11T18:23:42.000Z (10 months ago)
- Last Synced: 2025-04-15T15:12:25.993Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 34.2 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# woff2otf
[![NPM version][npm-version-image]][npm-link]
[![License][license-image]][license-link]
[![CI][ci-image]][ci-link]
Convert WOFF font files to OTF using NodeJS.
## Installation
```bash
npm install woff2otf
```
## Usage
### CLI
```bash
woff2otf fontToConvert.woff outputFont.otf
```
**WARNING: if the output file exists will be overwritten!**
### NodeJS
```javascript
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](https://github.com/hanikesn) because this program is a port from Python of [hanikesn/woff2otf](https://github.com/hanikesn/woff2otf)
[npm-link]: https://www.npmjs.com/package/woff2otf
[npm-version-image]: https://img.shields.io/npm/v/woff2otf
[license-image]: https://img.shields.io/npm/l/woff2otf?color=brightgreen
[license-link]: https://github.com/mondeja/woff2otf/blob/master/LICENSE
[ci-image]: https://img.shields.io/github/actions/workflow/status/mondeja/woff2otf/ci.yml?branch=master
[ci-link]: https://github.com/mondeja/woff2otf/actions?query=workflow%3ACI