0.0.1 • Published 9 years ago
fontmin-typeface v0.0.1
fontmin-typeface
typeface fontmin plugin
Install
$ npm install --save fontmin-typefaceUsage
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 exampleopen http://127.0.0.1:8080/example/

Related
0.0.1
9 years ago