diff options
Diffstat (limited to 'metawatch/metawatchplugin.cpp')
-rw-r--r-- | metawatch/metawatchplugin.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/metawatch/metawatchplugin.cpp b/metawatch/metawatchplugin.cpp index e56d6db..751cff9 100644 --- a/metawatch/metawatchplugin.cpp +++ b/metawatch/metawatchplugin.cpp @@ -1,3 +1,4 @@ +#include <QtGui/QFontDatabase> #include <QtConnectivity/QBluetoothAddress> #include "metawatch.h" #include "metawatchsimulator.h" @@ -6,6 +7,19 @@ using namespace sowatch; QTM_USE_NAMESPACE +bool MetaWatchPlugin::fontsLoaded = false; + +MetaWatchPlugin::MetaWatchPlugin() +{ + if (!fontsLoaded) { + QFontDatabase::addApplicationFont(":/metawatch/fonts/metawatch_16pt_11pxl.ttf"); + QFontDatabase::addApplicationFont(":/metawatch/fonts/metawatch_8pt_7pxl_CAPS.ttf"); + QFontDatabase::addApplicationFont(":/metawatch/fonts/metawatch_8pt_5pxl_CAPS.ttf"); + // "MetaWatch Large 16pt", "MetaWatch Large caps 8pt", "MetaWatch Small caps 8pt" + fontsLoaded = true; + } +} + MetaWatchPlugin::~MetaWatchPlugin() { |