Create a TTF font from an SVG font
npm install gulp-svg2ttf[//]: # ( )
[//]: # (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-svg2ttf as a development dependency:
``shell`
npm install --save-dev gulp-svg2ttf
Then, add it to your gulpfile.js:
`js
import svg2ttf from 'gulp-svg2ttf';
gulp.task('svg2ttf', () => {
gulp.src(['fonts/*.svg'])
.pipe(svg2ttf())
.pipe(gulp.dest('fonts/'));
});
`
#### options.ignoreExt
Type: Booleanfalse
Default value:
Set to true to also convert files that doesn't have the .svg extension.
#### options.clone
Type: Booleanfalse
Default value:
Set to true to clone the file before converting him so that it will output the
original file too.
#### options.timestamp
Type: NumberMath.round(Date.now()/1000)
Default value:
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: Stringundefined
Default value: (results in version 1.0)
Allows to set the version number of the font. Needs to be in the format Version (the Version` prefix is optional).
You may look after a full Gulp web font workflow, see
gulp-iconfont
fot that matter.
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.
[//]: # (::contents:end)