summaryrefslogtreecommitdiff
path: root/gui/main.cpp
diff options
context:
space:
mode:
authorkali <kali@leap.se>2021-10-04 12:59:01 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-11-23 21:51:17 +0100
commit7691f0f2967f721f3dee100956982ff625d7d945 (patch)
tree446fb202fd11a2802fd67e7b2df3050995c9f618 /gui/main.cpp
parentf3ed99f26f6f6a7d2b3d7da47409b28b2e042c05 (diff)
[ui] workarounds for font in osx
Diffstat (limited to 'gui/main.cpp')
-rw-r--r--gui/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gui/main.cpp b/gui/main.cpp
index be1be0a..581aedd 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -1,5 +1,6 @@
#include <csignal>
#include <unistd.h>
+#include <QtGui/qfontdatabase.h>
#include <QApplication>
#include <QTimer>
#include <QTranslator>
@@ -55,6 +56,12 @@ int main(int argc, char **argv) {
Backend backend;
+ const int fontId = QFontDatabase::addApplicationFont(":/resources/fonts/Roboto-Regular.ttf");
+ if (fontId == -1)
+ qWarning() << "Failed to add Roboto as app font";
+ else
+ qDebug() << QFontDatabase::applicationFontFamilies(fontId);
+
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setApplicationVersion(backend.getVersion());
QApplication app(argc, argv);