Erik van Blokland 3646055ea2 initial import
git-svn-id: http://svn.robofab.com/trunk@1 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-07 17:40:34 +00:00

24 lines
456 B
Python

# robofab manual
# Usepens howto
# usage examples
from robofab.world import CurrentFont
f = CurrentFont()
newGlyph = f.newGlyph('demoDrawGlyph', clear=True)
newGlyph.width = 1000
# hey, what's this:
pen = newGlyph.getPen()
# ha! a sneaky way to get a pen object!
pen.moveTo((100, 100))
pen.lineTo((800, 100))
pen.curveTo((1000, 300), (1000, 600), (800, 800))
pen.lineTo((100, 800))
pen.lineTo((100, 100))
pen.closePath()
newGlyph.update()
f.update()