1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
From: "Dr. Tobias Quathamer" <toddy@debian.org>
Date: Mon, 16 Apr 2018 20:42:04 +0200
Subject: Use Cantarell font instead of non-free Ubuntu regular
---
src/classes/app.py | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/classes/app.py b/src/classes/app.py
index 397f6d6..6fad87e 100644
--- a/src/classes/app.py
+++ b/src/classes/app.py
@@ -239,17 +239,13 @@ class OpenShotApp(QApplication):
log.debug("Loading UI theme")
if self.settings.get("theme") != "No Theme":
# Load embedded font
- font_path = os.path.join(info.IMAGES_PATH, "fonts", "Ubuntu-R.ttf")
- if os.path.exists(font_path):
- log.info("Setting font to %s", font_path)
- try:
- font_id = QFD.addApplicationFont(font_path)
- font_family = QFD.applicationFontFamilies(font_id)[0]
- font = QFont(font_family)
- font.setPointSizeF(10.5)
- QApplication.setFont(font)
- except Exception:
- log.warning("Error setting Ubuntu-R.ttf QFont", exc_info=1)
+ log.info("Setting font to Cantarell")
+ try:
+ font = QFont("Cantarell")
+ font.setPointSizeF(10.5)
+ QApplication.setFont(font)
+ except Exception:
+ log.warning("Error setting Cantarell QFont", exc_info=1)
# Set Dark Theme, if selected
if self.settings.get("theme") == "Humanity: Dark":
|