@m-o-z-g/gulp-svg2ttf

2.0.1 • Public • Published

gulp-svg2ttf

Create a TTF font from an SVG font with Gulp.

Fixed version of gulp-svg2ttf.

NPM version Dependency Status devDependency Status Coverage Status

Usage

First, install gulp-svg2ttf as a development dependency:

npm install --only=dev @m-o-z-g/gulp-svg2ttf

Then, add it to your gulpfile.js:

const svg2ttf = require('@m-o-z-g/gulp-svg2ttf');

gulp.task('svg2ttf', function(){
	gulp.src(['fonts/*.svg'])
		.pipe(svg2ttf())
		.pipe(gulp.dest('fonts/'));
});

API

svg2ttf(options)

options.ignoreExt

Type: Boolean Default value: false

Set to true to also convert files that doesn't have the .svg 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.

options.timestamp

Type: Number Default value: Math.round(Date.now()/1000)

Override the TTF font creation/modification date.

options.copyright

Type: String Default value: Fontello ad or SVG Font copyright metadata.

Allows to set to your copyright informations.

options.version

Type: String Default value: undefined (results in version 1.0)

Allows to set the version number of the font. Needs to be in the format Version <NUM>.<NUM> (the Version prefix is optional).

options.description

Type: String Default value: Generated by svg2ttf from Fontello project.

Allows to set to your description.

options.url

Type: String Default value: http://fontello.com

Allows to set the vendor's url.

Note

You may look after a full Gulp web font workflow, see gulp-iconfont fot that matter.

Contributing / Issues

Please submit SVG to TTF related issues to the svg2ttf project on wich gulp-svg2ttf 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 @m-o-z-g/gulp-svg2ttf

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

37.4 kB

Total Files

11

Last publish

Collaborators

  • m-o-z-g