From ea6b465a799c397227c74c4da74d7cf636a088e4 Mon Sep 17 00:00:00 2001 From: Adrien Tétar Date: Sun, 11 Oct 2015 12:24:04 +0200 Subject: meta: release metapatch --- Lib/defconQt/__main__.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'Lib/defconQt/__main__.py') diff --git a/Lib/defconQt/__main__.py b/Lib/defconQt/__main__.py index b8feaf2..f4c02fc 100644 --- a/Lib/defconQt/__main__.py +++ b/Lib/defconQt/__main__.py @@ -1,28 +1,24 @@ from defconQt.objects.defcon import TFont +from defconQt import representationFactories from defconQt.fontView import Application, MainWindow import sys import os from PyQt5.QtGui import QIcon -if len(sys.argv) < 2: - share_dir = os.path.join(os.path.dirname(__file__), '..', '..', 'share') - ufoFile = os.path.join(share_dir, 'fonts', 'subsets', 'Merriweather-Bold-Subset-nop.ufo') - print('Usage: %s ' % sys.argv[0]) - print('Loading default sample font: "%s"' % ufoFile) +if len(sys.argv) > 1: + font = TFont(os.path.abspath(ufoFile)) else: - ufoFile = sys.argv[1] - print('Loading font file: "%s"' % ufoFile) + font = None #from pycallgraph import PyCallGraph #from pycallgraph.output import GraphvizOutput -from defconQt import representationFactories representationFactories.registerAllFactories() #with PyCallGraph(output=GraphvizOutput()): app = Application(sys.argv) # TODO: http://stackoverflow.com/a/21330349/2037879 app.setOrganizationName("A. Tétar & Co.") -app.setApplicationName("defconQt") -app.setWindowIcon(QIcon("defconQt/resources/icon.png")) -window = MainWindow(TFont(os.path.abspath(ufoFile))) +app.setApplicationName("TruFont") +app.setWindowIcon(QIcon("defconQt/resources/app.png")) +window = MainWindow(font) window.show() sys.exit(app.exec_()) -- cgit v1.2.3