converter-webfont

1.0.0 • Public • Published

Converter-webfont

Font converter from ttf, otf to svg, woff, woff2, eot formats

Readme

RU

Getting Started

Installation globally

npm install converter-webfont -g
 
npm install git://github.com/kto32/converter-webfont -g

Usage example

cwebfont ./pathIn ./pathTo format

Installation in the project

npm install converter-webfont
 
npm install git://github.com/kto32/converter-webfont

Usage example

var convertFont = require('converter-webfont');
 
//do something
 
try {
    convertFont('./pathIn', './pathTo', 'svg,eot,ttf,woff');
} catch (err) {
    console.log(err);
}
 
//do something

or

var convertFont = require('converter-webfont');
 
//do something
 
convertFont('./pathIn', './pathTo', 'svg,eot,ttf,woff');
 
//do something

options

./pathIn

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.

./pathTo

Type: String

The path to save the result.

If you don't specify the path to the folder for saving the result, but specify the format or leave the field empty, then the result will be saved in the same folder

format

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.

Release History

(v.0.0.0)

(v.1.0.0)

Package Sidebar

Install

npm i converter-webfont

Weekly Downloads

2

Version

1.0.0

License

none

Unpacked Size

53.5 kB

Total Files

11

Last publish

Collaborators

  • kto32
  • asya-lapteva