Create a WOFF2 font from a TTF font
npm install gulp-ttf2woff2[//]: # ( )
[//]: # (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.)
[//]: # ( )

[//]: # (::contents:start)
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/'));
});
`
#### 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.
You may look after a full Gulp web font workflow, see
gulp-iconfont fot that matter.
Please submit TTF to WOFF2 related issues to the
ttf2woff2 project 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)