DrawBot can also be used as a regular module, without the UI. You can import it directly into your scripts, and save the output to disk. This also works outside of RoboFont.

The example below will save a pdf file in your Desktop folder.

import os
from drawBot import *

# draw something
newDrawing()
size('A4Landscape')
fill(1, 0, 0)
fontSize(120)
rotate(5)
text('hello world!', (100, 200))

# make image path
folder = os.path.expanduser('~/Desktop')
imgPath = os.path.join(folder, 'hello.pdf')

# save image
saveImage(imgPath)

Last edited on 27/03/2018