# gulp-ttf2woff2

> Create a WOFF2 font from a TTF font

Latest version **5.0.0** (published 2024-07-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-ttf2woff2
pnpm add gulp-ttf2woff2
yarn add gulp-ttf2woff2
bun add gulp-ttf2woff2
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2024-07-30 |
| First published | 2015-06-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.11.1 |
| Dependencies | 6 |
| Unpacked size | 36.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Nicolas Froidure |
| Maintainers | sabberworm, nfroidure, pioug |
| Keywords | gulpplugin, gulp, gulp-plugin, font, woff2, ttf, converter |

## Links

- npm: https://www.npmjs.com/package/gulp-ttf2woff2
- Repository: https://github.com/nfroidure/gulp-ttf2woff2
- Issues: https://github.com/nfroidure/gulp-ttf2woff2/issues
- npm.io page: https://npm.io/package/gulp-ttf2woff2

## Dependencies (6)

- [vinyl](https://npm.io/package/vinyl.md) ^3.0.0
- [ttf2woff2](https://npm.io/package/ttf2woff2.md) ^6.0.1
- [replace-ext](https://npm.io/package/replace-ext.md) ^2.0.0
- [@types/vinyl](https://npm.io/package/@types/vinyl.md) ^2.0.12
- [plugin-error](https://npm.io/package/plugin-error.md) ^2.0.1
- [bufferstreams](https://npm.io/package/bufferstreams.md) ^4.0.0

## 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

- 5.0.0 (latest) — 2024-07-30
- 4.0.1 — 2021-01-17
- 4.0.0 — 2021-01-15
- 3.0.0 — 2019-05-27
- 2.0.2 — 2015-11-21
- 2.0.1 — 2015-11-20
- 2.0.0 — 2015-09-12
- 1.1.2 — 2015-09-12
- 1.1.1 — 2015-06-26
- 1.1.0 — 2015-06-22
- 1.0.3 — 2015-06-20

## README

[//]: # ( )
[//]: # (This file is automatically generated by a `metapak`)
[//]: # (module. Do not change it  except between the)
[//]: # (`content:start/end` flags, your changes would)
[//]: # (be overridden.)
[//]: # ( )
# gulp-ttf2woff2
> Create a WOFF2 font from a TTF font

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nfroidure/gulp-ttf2woff2/blob/main/LICENSE)


[//]: # (::contents:start)

## Usage

First, install `gulp-ttf2woff2` as a development dependency:

```shell
npm install --save-dev gulp-ttf2woff2
```

Then, add it to your `gulpfile.js`:

```javascript
import ttf2woff2 from 'gulp-ttf2woff2';

gulp.task('ttf2woff2', () => {
  gulp
    .src(['fonts/*.ttf'], {
      encoding: false, // Important!
      removeBOM: false,
    })
    .pipe(ttf2woff2())
    .pipe(gulp.dest('fonts/'));
});
```

## API

### ttf2woff(options)

#### options.ignoreExt

Type: `Boolean` Default value: `false`

Set to true to also convert files that doesn't have the .ttf extension.

#### options.clone

Type: `Boolean` Default value: `false`

Set to true to clone the file before converting him so that it will output the
original file too.

### Note

You may look after a full Gulp web font workflow, see
[gulp-iconfont](https://github.com/nfroidure/gulp-iconfont) fot that matter.

### Contributing / Issues

Please submit TTF to WOFF2 related issues to the
[ttf2woff2 project](https://github.com/nfroidure/ttf2woff2) on which
gulp-ttf2woff2 is built.

This repository issues is only for gulp and gulp tasks related issues.

You may want to contribute to this project, pull requests are welcome if you
accept to publish under the MIT license.

[//]: # (::contents:end)

# Authors
- [Nicolas Froidure](http://insertafter.com/en/index.html)

# License
[MIT](https://github.com/nfroidure/gulp-ttf2woff2/blob/main/LICENSE)

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