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

23 lines
688 B
Python
Executable File

#FLM: Copy selected sidebearings to other font
from robofab.world import CurrentFont, SelectFont
from robofab.interface.all.dialogs import ProgressBar
myFont = CurrentFont()
myGlyphs = myFont.selection
myDestination = SelectFont("Select destination font")
if myDestination is not None:
bar = ProgressBar('Copying sidebearings...', len(myGlyphs))
for myChar in myGlyphs:
if myDestination.has_key(myChar):
myDestination[myChar].leftMargin = myFont[myChar].leftMargin
# myDestination[myChar].rightMargin = myFont[myChar].rightMargin
myDestination[myChar].width = myFont[myChar].width
myDestination[myChar].mark = 26
bar.tick()
myDestination.update()
bar.close()