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

27 lines
694 B
Python
Executable File

#FLM: Interpolate in current font
# Interpolate selected glyphs in the current font
# Paul van der Laan, 2004/08/12
from robofab.world import SelectFont, CurrentFont
from robofab.interface.all.dialogs import ProgressBar
factor = 1.37
myFont = CurrentFont()
myGlyphs = myFont.selection
myMin = SelectFont('Select source font one:')
if myMin:
myMax = SelectFont('Select source font two:')
if myMax:
bar = ProgressBar('Interpolating...', len(myGlyphs))
for myChar in myGlyphs:
myFont.removeGlyph(myChar)
myNewglyph = myFont.newGlyph(myChar)
myNewglyph.interpolate(factor, myMin[myChar], myMax[myChar])
myFont[myChar].mark = 26
bar.tick()
bar.close()
myFont.update()