Exemplo n.º 1
1
 def rename_glyphs(self, names_list):
     print "renaming glyphs in space...\n"
     for ufo_path in self.ufos():
         ufo = RFont(ufo_path, showUI=False)
         print "\trenaming glyphs in %s..." % get_full_name(ufo)
         rename_glyphs_from_list(ufo, names_list, overwrite=True, mark=False, verbose=False)
         ufo.save()
     print
     print "...done.\n"
 def apply_callback(self, sender):
     _overwrite = self.w._overwrite.get()
     _mark = self.w._mark.get()
     # the apply button was pressed before getting the list file
     if not self.list_path:
         print 'please get a names list first.\n'
         return
     f = CurrentFont()
     if f is not None:
         names_list = read_names_list_from_file(self.list_path)
         if len(names_list) > 0:
             rename_glyphs_from_list(f, names_list, overwrite=_overwrite, mark=_mark)
         # no glyph selected
         else:
             print no_glyph_selected
     # no font open
     else:
         print no_font_open
Exemplo n.º 3
0
 def apply_callback(self, sender):
     _overwrite = self.w._overwrite.get()
     _mark = self.w._mark.get()
     # the apply button was pressed before getting the list file
     if not self.list_path:
         print 'please get a names list first.\n'
         return
     f = CurrentFont()
     if f is not None:
         names_list = read_names_list_from_file(self.list_path)
         if len(names_list) > 0:
             rename_glyphs_from_list(f, names_list, overwrite=_overwrite, mark=_mark)
         # no glyph selected
         else:
             print no_glyph_selected
     # no font open
     else:
         print no_font_open