Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

gulp-ttf2woff2

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-ttf2woff2

Create a WOFF2 font from a TTF font

latest
Source
npmnpm
Version
5.0.0
Version published
Weekly downloads
33K
25.97%
Maintainers
3
Weekly downloads
 
Created
Source

gulp-ttf2woff2

Create a WOFF2 font from a TTF font

GitHub license

Usage

First, install gulp-ttf2woff2 as a development dependency:

npm install --save-dev gulp-ttf2woff2

Then, add it to your gulpfile.js:

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 fot that matter.

Contributing / Issues

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.

Authors

  • Nicolas Froidure

License

MIT

Keywords

gulpplugin

FAQs

Package last updated on 30 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts