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

31 lines
681 B
Python
Executable File

#FLM: Draw lines
from robofab.world import CurrentFont
# myLines = ((-10,692,57), (-10,-177,57)) # Fresco kader
myLines = ((-5,-124,48),)
myFont = CurrentFont()
for myGlyph in myFont:
myGlyphwidth = myFont[myGlyph.name].width
for myLine in myLines:
myPen = myGlyph.getPen()
myMargin = myLine[0]
myHeight = myLine[1]
myWeight = myLine[2]
myStrokewidth = myGlyphwidth - myMargin
myPen.moveTo((myMargin,myHeight))
myPen.lineTo((myStrokewidth,myHeight))
myPen.lineTo((myStrokewidth,myHeight+myWeight))
myPen.lineTo((myMargin,myHeight+myWeight))
myPen.lineTo((myMargin,myHeight))
myPen.closePath()
myGlyph.update()
myFont.update()
print "Done"