Best resources to learn Python in regards to font design?

I have started to learn Python and finding it quite interesting, though I am wondering what are the best resources to learning python in regards to font design? and what parts of Python I should focus on learning?


  • Ramiro EspinozaRamiro Espinoza Posts: 835
    edited November 2016
    If you don't have previous programming experience, I think it is a good idea to complete the Codecademy's Python course. After you are done with it, learn the font object model used by your favourite font making software (Glyphs, Fontlab - Robofab or Robofont) 
  • First decision is which version of Python to learn: version 2 or 3. Most font editors and tools that I know still rely on Python 2.7. Therefore it probably makes most sense to focus on that first.

    I can recommend to learn the basics of Python from the official tutorial. Just learn the basic principles of the language (loops, tests, functions) and common objects such as numbers, strings, lists and dictionaries.

    Then get to grips with RoboFab, which is a Python library included in many font software for dealing with fonts as Python objects. This RoboFab tutorial is a bit old, but still relevant for most parts.

    Hope this helps.
  • In case you are working with Glyphs, the three-part Python primer for Glyphs users may be helpful:
  • Every time I try to learn a new language, I look at documentation for hours and then forget to actually write any code, so I think if you're comfortable with programming generally, the importance of having a prompt / something to work towards is huge (at least for me).

    Most obvious way to get a prompt is to find a task that you're repeating over and over again when you design, and think of how you could automate it. You'll find out little things about Python along the way.

    See what other people are making, too! This lecture with Andy Clymer is still one of the most inspiring uses of code-assisted font design to me. Search github for Glyphs / FontLab / RoboFont scripts to get a sense of what other people making (and how they're making it).
  • In addition to what Paul and Rainer said, go to a design convention an attend a workshop. The problem is that Python is big, and it can do a great deal, so it’s easy to get lost in the stuff you’ll never use. Spending a day or two learning from experienced type geeks will help you focus on the relevant stuff.
  • When coming from a designer’s background, making your first steps in Python with Drawbot is something that I would strongly recommend. 
  • This may be a little unorthodox but these days I would say, start by reading. Out loud. Read through as many simple scripts as you can and aim to understand how they do what they are doing. Don't aim to understand 100%, just get a sense of what is going on. Then build up to more complex scripts.

    After that it's worth looking at tutorials. But if you start with tutorials it will take you a long time before you are able to connect the concepts that you are reading about with what you aim to achieve. If you start with reading examples, you will get a sense of how to make this actually do font stuff.
  • I'll second all of the last three comments!

    But to expand on Simon C: don’t just look at existing scripts, find ones that do things similar to what you'd like to do, and try modifying them. You can make a lot of progress that way, and get things done even before you understand every bit of the code.
  • Thank you all for your advice. I have actually worked through the codecademy Python course already which I found quite enjoyable, so it's good to see there are resources I can use to learn the specific parts I want.
  • @Kayley Hill I hope you get many Codecademy badges :)

  • I would start with RoboFab. It works in several font editors and has simple examples of how to access font data. There are also basic python scripts.
Sign In or Register to comment.