gulp-ttf2woff2
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/gulp-ttf2woff2 package

4.0.1 • Public • Published

gulp-ttf2woff2

Create a WOFF2 font from a TTF font with Gulp.

NPM version Run test Dependency Status devDependency Status Coverage Status Code Climate

Usage

First, install gulp-ttf2woff2 as a development dependency:

npm install --save-dev gulp-ttf2woff2

Then, add it to your gulpfile.js:

var ttf2woff2 = require('gulp-ttf2woff2');

gulp.task('ttf2woff2', function(){
  gulp.src(['fonts/*.ttf'])
    .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 fot that matter.

Stats

NPM NPM

Contributing / Issues

Please submit TTF to WOFF2 related issues to the ttf2woff2 project on wich 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 licence.

Package Sidebar

Install

npm i gulp-ttf2woff2

Weekly Downloads

25,987

Version

4.0.1

License

MIT

Unpacked Size

16.5 kB

Total Files

8

Last publish

Collaborators

  • sabberworm
  • nfroidure
  • pioug