Glyph-Filters
Glyph-Filters copied to clipboard
Run filters from the command line
This is a work in progress. Do not merge!
But it's an exciting one. The idea is that there is a library called glyphsLib which reads and writes Glyphs data structures, outside of the Glyphs application. You don't get all the Glyphs features but you can perform simple manipulations on the data structures. The upshot of this is that filters which just load a data structure, manipulate it, and write it back again, can now do that from the command line:
% python3 apply-filter.py Source/Rubik.glyphs Scripts/05-WetPaint.py
starting glyph: A
glyph size: M
Processing time for glyph( A ): 2.3162 seconds
-
...
Saved on Source/Rubik-05.glyphs
And if we can do that, we can e.g. do it with GitHub Actions to build the fonts automatically. This won't work for most of the filters because curve offsetting (and path direction fixing) is something done by the Glyphs application, not something that we can do "by hand". But we can do some of them.
Ha! Bloody hell, that's great!