grunt-converter-webfont
v1.0.0
Published
Конвертор шрифотов из ttf,otf в форматы svg,woff,woff2,eot
Downloads
2
Readme
grunt-converter-webfont
Font converter from ttf, otf to svg, woff, woff2, eot formats
Readme
Getting Started
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-converter-webfont --save-dev
npm install git://github.com/kto32/grunt-converter-webfont --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-converter-webfont');
The "converter_webfont" task
Overview
In your project's Gruntfile, add a section named converter_webfont
to the data object passed into grunt.initConfig()
.
module.exports = function(grunt) {
grunt.initConfig({
converter_webfont: {
cwebfont: {
options: {
typeFile: ['svg,eot,ttf,woff'],
},
files: [{
cwd: 'pathIn',
dest: 'pathTo'
}]
},
},
});
grunt.loadNpmTasks('grunt-converter-webfont');
grunt.registerTask('default', ['converter_webfont']);
};
Options
options.typeFile
Type: String
Default value: svg,ttf,eot,woff
Specify formats separated by commas, possible formats: svg,ttf,eot,woff,woff2
.
When using woff2, the script will work out a little longer due to compression.
files.cwd
Type: String
Required: true
The path to the folder with fonts in the ttf, otf format. Files of other formats in the folder are ignored.
files.dest
Type: String
Required: true
The path to save the result.
Release History
(v.0.0.0)
(v.1.0.0)