A typeface (or font) is a styled way of representing text. Today we take for granted the ability to use lots of fonts everywhere, but making this possible took a huge amount of work. One of the major breakthroughs was Apple's introduction of TrueType, a system for drawing sharp outlines of each letter form instead of saving each letter as an image. Image-based fonts get pixellated when they are made too big, and become hard to read when they are made too small.

In this problem set, you will design a few letters for a typeface of your own design. As with TrueType, each of your letters will be drawn in a way that scales to any size. There is a function in typeface.py (the only file you should edit) for each letter of the English alphabet.

Each letter's function (draw_letter_a, draw_letter_b, etc.) should have the turtle draw that letter.

Getting started

Get some scratch paper. Draw an 8-by-8 grid, nice and large. Choose a letter from the English alphabet and draw it on the grid. It will be easier if you only use horizontal, vertical, and diagonal lines, but you're welcome to use curves (see the documentation for turtle.circle) if you want a challenge.

Once you have drawn your letter, trace its lines with your finger. Which will be drawn first? When does the turtle need to turn or pick up the pen? Consider writing down a list of what the turtle needs to do. Then see if you can turn this into code.

Before you start programming, remember to get set up:

Once you have started writing code for the letter, save your work and test your program. test.py is provided for just this purpose. To test draw_letter_q, run:

$ python test.py q

test.py is perfect for testing individual letters. The other provided program, proof.py, draws a proof sheet with all the letters, at two different scales. After you have a letter working with test.py, try running:

$ python proof.py


def fly(distance):