# wawoff2

> Convert TTF font to WOFF2

Latest version **2.0.1** (published 2022-01-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install wawoff2
pnpm add wawoff2
yarn add wawoff2
bun add wawoff2
```

Provides the commands `woff2_compress.js`, `woff2_decompress.js`.

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2022-01-19 |
| First published | 2018-02-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/wawoff2) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 88 |
| Maintainers | vitaly |
| Keywords | font, ttf, woff, woff2, convertor |

## Links

- npm: https://www.npmjs.com/package/wawoff2
- Repository: https://github.com/fontello/wawoff2
- Homepage: https://github.com/fontello/wawoff2#readme
- Issues: https://github.com/fontello/wawoff2/issues
- npm.io page: https://npm.io/package/wawoff2

## Dependencies (1)

- [argparse](https://npm.io/package/argparse.md) ^2.0.1

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2022-01-19
- 2.0.0 — 2021-04-04
- 1.0.2 — 2018-03-22
- 1.0.1 — 2018-02-24
- 1.0.0 — 2018-02-15

## README

woff2 for node.js (via WebAssembly)
===================================

[![CI](https://github.com/fontello/wawoff2/actions/workflows/ci.yml/badge.svg)](https://github.com/fontello/wawoff2/actions/workflows/ci.yml)
[![NPM version](https://img.shields.io/npm/v/wawoff2.svg?style=flat)](https://www.npmjs.org/package/wawoff2)

Google's [woff2](https://github.com/google/woff2) build for `node.js`, using
WebAssembly. Why this is better than binary bindings:

- works everywhere without rebuild


Install
-------

```sh
npm install wawoff2
```


Use Example
-----------

```js
const wawoff = require('wawoff2');

// src - Buffer or Uint8Array
wawoff.compress(src).then(out => {
  // store result
});
```

Command-line Example
--------------------

To compress a `.ttf` file into a `.woff2` file:

```bash
woff2_compress.js [-h] [-v] infile [outfile]

Positional arguments:
  infile         Input .ttf file
  outfile        Output .woff2 file (- for stdout)

Optional arguments:
  -h, --help     Show this help message and exit.
  -v, --version  Show program's version number and exit.
```

And the opposite, to decompress a `.woff2` file into a `.ttf` one:

```bash
woff2_decompress.js [-h] [-v] infile [outfile]

Positional arguments:
  infile         Input .woff2 file
  outfile        Output .ttf file (- for stdout)

Optional arguments:
  -h, --help     Show this help message and exit.
  -v, --version  Show program's version number and exit.
```

---
_Source: https://npm.io/package/wawoff2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
