Some free FontLab scripts for type designers

I have started posting a few scripts in my own repository on GitHub. They are libre (free, open source) under an Apache 2.0 license.

tphinney-github-repo

  • Generate-substitutions.py: Select some glyphs in the font window. Run the script. It will automatically generate useful OpenType feature code (in .fea/​AFDKO syntax) in the Output window, which you can copy/​paste right into the appropriate feature. The script works with both simple substitutions and ligatures as long as you follow standard Adobe glyph naming standards (appropriate use of period and underscore). It does not work with complex cases involving multiple-​feature interaction, sorry.
  • Make-numbers-from-dnom.py: First you need to create some numbers sized and positioned for use as denominators. The script will take all the glyphs in your font ending in “.dnom” and create numerator, superscript and subscript versions using the dnom glyphs as components. If the font is an italic font, it will use the italic angle of the font to calculate how much to shift the components horizontally while moving them vertically. NOTE: the vertical shifts are hardcoded in the script now, but easily edited. Future improvement ideas: pop up a dialog to enter the vertical shift numbers, and/​or try to auto-​calculate them.

Unfortunately, my “best” (or at least most complicated) script is very specific to my workflow on developing my Cristoforo family (it does the steps detailed at the bottom of this blog post). It is a heavily modified version of Ben Kiel’s “Better Generate Font” script. I chose not to post it as the workflow is just so very peculiar to my needs and does things like put my license URLs in the font, but if you want it for some reason, perhaps as a starting point, ping me.

 

 

 

Comments

2 responses to “Some free FontLab scripts for type designers”

  1. Dave

    Why not post it with the too-​specific parts turned into variables? 🙂

  2. I’m happy to supply it to anybody else who’d like to do that….

    But really most of the customization I did of the original script is specific to my workflow.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.