Skip to content

junmer/fontmin-typeface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/ or https://junmer.github.io/fontmin-typeface/example/#00FF32501#hello

hello

Related

Releases

No releases published

Packages

No packages published