Python Scripting: microscripts
Following the utterly useless Glyph Color Selector,, my first gift for you in 2008 will be, again, scripts.
These microscripts cover pretty straightforward needs. They just tend to reflect my skills in the field of coding: small.
Make EM box
Will create a glyph in your vfb, named “embox”, which will be a 1000×1000em square. Sometimes useful for cross-fonts and cross-softwares comparisons.
Download MakeEMbox.py.zip
Save all opened font’s metrics info
As it name suggests, will export all AFM and INF for the opened vfbs.
I am still struggling to make this happen for features and classes (would be a lot more useful)
Download SaveAllAsAFM.py.zip
Set all opened font’s Version number and creation year
It will also sync the different values (TT version etc) in the font info.
A two-lines manual: open the script, modify the options between double quotes:
versionMajor = "0" #Set your version number here
versionMinor = "001" #Set your revision number here
year = 2008
Download FontInfoVersionanddate.py.zip
Special glyphs creator
Creates space, .CR, .notdef and .null glyphs.
Font UPM must be 1000. Script also adds Ux0020 Unicode value to /space (so comment-out if unneeded). Script also draws an (ugly) .notdef glyph. Very very ugly.
Download SpecialGlyphsCreator.py.zip