drawbotscreen.jpg

LettError
RoboFab
Processing
Python
PyObjC

Copyright
2003-2008
DrawBot

Reference

Text

font(name)

Set the font to "name". The font has to be installed in the system, and you have to make sure you get the exact name. For instance "Lucida Grande" but not "Lucida" or "Lucida-Grande".

# example
font("Lucida Grande")

fontsize(size)

Set the font size to a particular value.

# example
fontsize(10)
a = 12.4
fontsize(a)

text(aText, x, y)

Add text, a string, at position (x, y). Use the previously selected font and font size.

fill(1, .5, 0, 1)
font("Lucida Grande")
for x in range(30, 200, 30):
    for y in range(30, 200, 20):
        fontsize(randint(2, 30))
        text("A", x, y)

text.png