A more detailed explanation of how FontLab applications use the
Python macro language and some examples of scripts by users.
The Python macro language is a really powerful tool that can save you loads
of time in performing tedious tasks. Need to add a bevel to all the characters
in your font? A Python macro can do it in a flash. Want to rename all your fonts
to add your foundry intials? Do the whole library in seconds with a macro. Got
an idea for a new FontLab tool? Write it in Python and add it to the FontLab
menus.
The FontLab/Python API is documented at:
The Unofficial FontLab/Python API
Reference
RoboFab
is an excellent impressive Python library the builds upon FontLab and
can be used for font, glyph and metrics manipulation. RoboFab works with
FontLab, although it can also to some extent work in "pure Python." RoboFab was
developed by Tal Leming, Erik van Blokland and Just van
Rossum.
Python Background
Python is an interpreted, interactive, object-oriented programming language.
It is often compared to Tcl, Perl, Scheme or Java. Originally developed by Guido
van Rossum in 1990 it is an open source language and has gained popularity
rapidly. For this reason we chose it as the scripting language for FontLab 4
macros.
www.python.org is the official Python
language web site. This site has or has links to everything you could possibly
want to know about Python, including some fine tutorials.
Python FontLab macro demos
Roger Dawkins writes a macro to create an outline version of a font
The
development
Finished script
Adam Twardoch's "FontLab on Steroids" script set (includes Rename
glyphs by scheme [TTG] macro)
Windows
version Macintosh
version
Vince Fitter has made some nice little macros for special
effects:
Windows
version Macintosh
version
Gustavo Ferreira made a pixel brush to draw outline bitmap fonts in Fontlab.
Python Books and Resources:
Macro Programming, FontLab Studio manual
Python Programming for the Absolute Beginner
FontLab
Scripting discussion list
The Python Bookstore
Python Shareware for FontLab
Do you have a script that others might find useful? Share it here!
Python Freeware for FontLab
want to donate a script to the community? Send it
in!