Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laoshu133/sfnt2woff
A woff converter for ttf or otf, support Node.js and Browsers.
https://github.com/laoshu133/sfnt2woff
Last synced: 28 days ago
JSON representation
A woff converter for ttf or otf, support Node.js and Browsers.
- Host: GitHub
- URL: https://github.com/laoshu133/sfnt2woff
- Owner: laoshu133
- Created: 2018-05-08T10:57:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-08T13:32:04.000Z (over 6 years ago)
- Last Synced: 2024-10-12T01:50:30.721Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-typography - sfnt2woff - Convert TTF or OTF to WOFF, support Node.js and Browsers. (JavaScript)
README
# sfnt2woff
A woff convertrt for ttf or otf, Support for Node.js and Browsers.
Based on [odemiral/woff2sfnt-sfnt2woff](https://github.com/odemiral/woff2sfnt-sfnt2woff)
# Usage
With a package:
```javascript
const fs = require('fs');
const sfnt2woff = require('sfnt2woff');const buf = fs.readFileSync('/path/to/xxx.otf');
const woffBuf = sfnt2woff(buf);fs.writeFileSync('/path/to/xxx.woff', woffBuf);
```With cli:
```
sfnt2woff input.otfOptions:
-o, --output Ouput path [default: "./"]```
# License
MIT