FontX
A npm package to make working with fonts easier.
Installation
npm i fontx --save
You'll need Node.JS 6 or newer.
If you want to use the command-line interface you'll probably want to install it globally so that you can run fontx
from anywhere.
npm i -g fontx
CLI
fontx <command>
Commands:
fontx export <font> <directory> export all glyphs to a folder
fontx web <font> start the webserver
Options:
--help, -h Show help [boolean]
--version, -v Show version number [boolean]
API
From example.js:
const fontx = require("./api"); // Initialise the core (required)const core = fontx.Core("font.ttf"); // Start the Express webserverfontx.Express(core, 3000); // Export all glyphs to a folderfontx.Export(core, "out");