0.0.1 • Published 7 years ago

fontmin-typeface v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

fontmin-typeface

Build Status NPM version Downloads Dependencies

typeface fontmin plugin

Install

$ npm install --save fontmin-typeface

Usage

Fontmin convert font.ttf to font.typeface.json as https://github.com/mrdoob/three.js/tree/master/examples/fonts

var Fontmin = require('fontmin');
var typeface = require('fontmin-typeface');

var fontmin = new Fontmin()
    .src('fonts/*.ttf')
    .use(Fontmin.glyph({text: 'hello world'}))
    .use(typeface({filetype: 'json'}))
    .dest('build/fonts');
    
fontmin.run(function (err, files) {
    if (err) {
        throw err;
    }

    console.log('Files typeface successfully!'); 
});

Example

npm run example

open http://127.0.0.1:8080/example/

hello

Related