Scripting for production

Production
In the production phase of a font it all comes together: moving stuff around, naming, interpolations, quality control, generating, database work, it pays to invest some time (or money) in some really good scripts. Each foundry and designer has their own preferred ways of doing things. It's impossible to describe one production process and please everyone. So instead we're going to look at some of the things you probably have to do anyway. You will have to match and adapt for your own methods.
Production scripts can save a lot of time. But be careful: it is costly to make mistakes with your production sources. Make sure to test production scripts first on duplicate data, preferably in a different folder. Doing something "quickly" to a massive kerning table only to discover it was your only copy, and the action was wrong — will not save you any time. Like carpentry: measure twice, cut once.
Batch processing
Here are some examples of applying changes to several fonts at once using AllFonts(). Keep in mind that this applies to all fonts you have open in FontLab. So make sure to close any fonts that you don't want treated this way before running the script.
# robothon06
# set font info in all fonts
from robofab.world import AllFonts
for font in AllFonts():
font.info.familyName = "MyFamily"
font.info.ascender = 700
font.info.descender = -300
font.update()
Obviously you can extend these to do lots more.
# robothon 2006
# get info attributes for all fonts
# and dump them to a text file
from robofab.world import AllFonts
from robofab.interface.all.dialogs import PutFile
text = []
for font in AllFonts():
text.append(str(font.path))
text.append(str(font.info.familyName))
text.append(str(font.info.styleName))
text.append(str(font.info.fullName))
text.append(str(font.info.unitsPerEm))
text.append(str(font.info.ascender))
text.append(str(font.info.descender))
text.append('')
text = '\n'.join(text)
path = PutFile('Save file as:')
if path:
file = open(path, 'w')
file.write(text)
file.close()