fontmin-typeface
v0.0.1
Published
typeface fontmin plugin
Downloads
4
Maintainers
Readme
fontmin-typeface
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/