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

19 lines
468 B
Python
Executable File

#FLM: Add remove .sc in selected glyphnames
from robofab.world import CurrentFont
from robofab.interface.all.dialogs import ProgressBar
myFont = CurrentFont()
myGlyphs = myFont.selection
myBar = ProgressBar('Changing names...', len(myGlyphs))
for myGlyph in myGlyphs:
if myFont[myGlyph].name[-3:] == '.sc':
myFont[myGlyph].name = myFont[myGlyph].name[:-3]
else:
myFont[myGlyph].name += '.sc'
myFont[myGlyph].update()
myBar.tick()
myBar.close()
print "done"