Book recommendations: Python for Fontlab

Dunwich Type
28.Sep.2008 5.21pm
Dunwich Type's picture

Does anyone have recommendations for good books (in English, please) about Python that would be useful for learning to use it with Fontlab? I’ve been trying to read Learning Python from O’Reilly but it’s clearly written for C programmers and thus manages to be simultaneously ponderous, redundant, silly and just makes for an incredibly tedious read. It’s sort of like trying to get through the monologues in Atlas Shrugged but harder to justify.

"Learning Python" is a book that I always refer to when I have questions. It's very good as it provides the fundamentals of using Python as the scripting language. But you don't have to read the whole book page by page. You can just focus on learning about Python's building blocks — integers, strings, list, dictionaries — and how to manipulate them. Once you know the language's basics you can then turn to learning FontLab's API, understand how the objects — fonts, glyphs, kerning, etc. — are structured and what methods and properties they have. It will take time to wrap your head around these things, but once you get it it won't be that difficult to develop small scripts that help a lot with repetitive tasks.

The FontLab 4.5 Python reference is not fully up-to-date, but for the most part it has everything you need. (The stuff that's missing is mainly related with handling MM fonts)

And don't forget Robofab. Using Robofab you'll be able to achieve a lot more with less lines of code. Follow Robofab's step by step crash course and take a look at the Example scripts.

And be aware that FontLab has many many quirks. That's probably not news to you, but just letting you know that the scripting side of FontLab is not perfect either.


I rely entirely on the official documentation from the Python website. The Tutorial is a brilliant, informal introduction with just the right mix of explanation and code examples. You will probably need the Reference and Library Reference only when you get somewhat deeper into it. I also got some printed python books from the library but I didn't find any of them as useful.

And then, the Fontlab Python reference mentioned by Miguel is essential, of course.