def main(): if len(sys.argv) > 1: font = TFont(os.path.abspath(sys.argv[1])) else: font = None representationFactories.registerAllFactories() app = Application(sys.argv) # TODO: http://stackoverflow.com/a/21330349/2037879 app.setOrganizationName("TruFont") app.setOrganizationDomain("trufont.github.io") app.setApplicationName("TruFont") app.setWindowIcon(QIcon(":/resources/app.png")) settings = QSettings() glyphListPath = settings.value("settings/glyphListPath", "", type=str) if glyphListPath and os.path.exists(glyphListPath): from defconQt.util import glyphList try: glyphList = glyphList.parseGlyphList(glyphListPath) except Exception as e: print(e) else: app.GL2UV = glyphList window = MainWindow(font) window.show() sys.exit(app.exec_())
def setUp(self): self.mainWindow = MainWindow(None) self.mainWindow.fontInfo() self.font = self.mainWindow.font self.fontInfo = self.mainWindow.fontInfoWindow self.generalTab = self.fontInfo.tabWidget.widget(0) self.metricsTab = self.fontInfo.tabWidget.widget(1) self.openTypeTab = self.fontInfo.tabWidget.widget(2) self.OS2Tab = self.fontInfo.tabWidget.widget(3) self.postScriptTab = self.fontInfo.tabWidget.widget(4) self.fontInfo.show()
def setUp(self): font = TFont() font.info.unitsPerEm = 1000 font.info.ascender = 750 font.info.descender = -250 font.info.capHeight = 750 font.info.xHeight = 500 self.mainWindow = MainWindow(font) self.mainWindow.fontInfo() self.font = self.mainWindow.font self.fontInfo = self.mainWindow.fontInfoWindow self.generalTab = self.fontInfo.tabWidget.widget(0) self.metricsTab = self.fontInfo.tabWidget.widget(1) self.openTypeTab = self.fontInfo.tabWidget.widget(2) self.OS2Tab = self.fontInfo.tabWidget.widget(3) self.postScriptTab = self.fontInfo.tabWidget.widget(4) self.fontInfo.show()