示例#1
0
 def reloadFile(self):
     font = self._font
     path = font.path or font.binaryPath
     if not font.dirty or path is None:
         return
     if not ReloadMessageBox.getReloadDocument(self, self.fontTitle()):
         return
     if font.path is not None:
         font.reloadInfo()
         font.reloadKerning()
         font.reloadGroups()
         font.reloadFeatures()
         font.reloadLib()
         font.reloadGlyphs(font.keys())
         font.dirty = False
     else:
         # TODO: we should do this in-place
         font_ = font.__class__().new()
         font_.extract(font.binaryPath)
         self.setFont_(font_)
示例#2
0
 def reloadFile(self):
     font = self._font
     path = font.path or font.binaryPath
     if not font.dirty or path is None:
         return
     if not ReloadMessageBox.getReloadDocument(self, self.fontTitle()):
         return
     if font.path is not None:
         font.reloadInfo()
         font.reloadKerning()
         font.reloadGroups()
         font.reloadFeatures()
         font.reloadLib()
         font.reloadGlyphs(font.keys())
         font.dirty = False
     else:
         # TODO: we should do this in-place
         font_ = font.__class__().new()
         font_.extract(font.binaryPath)
         self.setFont_(font_)