make-glyphs
Tools for working with
.glyphs
font files
Load, validate, manipulate, and write font files for Glyphs using Javascript.
⚠️ Work in Progress ⚠️
The API described below is functional but may change. Testing and contributions are welcome. See issues for known problems and to report any bugs or feature requests.
Install
npm install --save make-glyphs
Programmatic Usage
const GLYPHS = // load a .glyphs fileGLYPHS // subset '!' and all capital letters // increment the minor version // rename the font // write the changes to a new font file
Full API Documentation →
make-glyphs
as a build tool
Using Installing this package will also install a make-glyphs
command that you can use to set up builds for your project. To use this, you will need to create a glyphs.config.js
file in your project root, describing your builds. Here’s an example:
// glyphs.config.jsmoduleexports = builds: 'basic-latin': load: 'src/my-font.glyphs' process: 'subset' 'Basic Latin' 'set' 'familyName' ` Basic` write: 'build/my-font-basic-latin.glyphs' version: load: 'src/my-font.glyphs' process: 'version' write: 'src/my-font.glyphs'
See documentation for the .build()
method for more details.
Now you can set up npm scripts to run these builds in your package.json
…
/* package.json */
…and then run the scripts from the command line:
npm run subset # runs the 'basic-latin' build npm run version # runs the 'version' build
See also
- readable-glyph-names — Unicode string to readable character name mapping as JSON
- write-glyphs-file — Stringify and write a
.glyphs
font file atomically
License
This software is free to use, modify, and redistribute under a GNU General Public License.