1.0.2 • Published 9 years ago

webfontify v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago
<a href="http://badge.fury.io/js/webfontify"><img src="https://badge.fury.io/js/webfontify.svg" alt="npm version" height="18"></a>
<a href="https://travis-ci.org/quarterto/webfontify"><img src="https://travis-ci.org/quarterto/webfontify.svg?branch=develop" alt="Build Status"></a>

Easily convert TTF to webfonts and output CSS

Usage

As a command

Install webfontify globally (or locally, and run from node_modules/.bin, then it's webfontify path/to/font.ttf. By default, it outputs fonts to fonts/$fontname.{eot,woff,svg} and CSS to css/$fontname.css.

As a transform

Install locally alongside Browserify and something to bundle your CSS and run browserify -t webfontify -t $css_importer index.js, and any require statments pointing to .ttfs will convert the TTF and replace it with a require statement for generated CSS.

As a module

var webfontify = require('webfontify/transform');

fs.createReadStream('path/to/font.ttf').pipe(
	webfontify('path/to/font.ttf', options)
);

Options

Just cssDir/--css-dir and fontDir/--font-dir for now. They do what you expect.

Licence

MIT