[//]: # ( )
[//]: # (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-ttf2woff
> Create a WOFF font from a TTF one

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


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

## Usage

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

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

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

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

gulp.task('ttf2woff', () => {
  gulp.src(['fonts/*.ttf'], {
      encoding: false, // Important!
      removeBOM: false,
    })
    .pipe(ttf2woff())
    .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.

## Stats

[![NPM](https://nodei.co/npm/gulp-ttf2woff.png?downloads=true&stars=true)](https://nodei.co/npm/gulp-ttf2woff/)
[![NPM](https://nodei.co/npm-dl/gulp-ttf2woff.png)](https://nodei.co/npm/gulp-ttf2woff/)

### Contributing / Issues

Please submit TTF to WOFF related issues to the
 [ttf2woff project](https://github.com/fontello/ttf2woff)
 on wich gulp-ttf2woff 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 licence.


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

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

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