summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics/rbfont.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/graphics/rbfont.cpp')
-rw-r--r--utils/themeeditor/graphics/rbfont.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/utils/themeeditor/graphics/rbfont.cpp b/utils/themeeditor/graphics/rbfont.cpp
index e59c79a..1c2739d 100644
--- a/utils/themeeditor/graphics/rbfont.cpp
+++ b/utils/themeeditor/graphics/rbfont.cpp
@@ -27,6 +27,7 @@
#include <QPainter>
#include <QBitmap>
#include <QImage>
+#include <QSettings>
quint16 RBFont::maxFontSizeFor16BitOffsets = 0xFFDB;
@@ -36,7 +37,19 @@ RBFont::RBFont(QString file)
/* Attempting to locate the correct file name */
if(!QFile::exists(file))
- file = ":/fonts/08-Schumacher-Clean.fnt";
+ {
+ /* Checking in the fonts repository */
+ QSettings settings;
+ settings.beginGroup("RBFont");
+
+ file = file.split("/").last();
+ file = settings.value("fontDir", "").toString() + "/" + file;
+
+ settings.endGroup();
+
+ if(!QFile::exists(file))
+ file = ":/fonts/08-Schumacher-Clean.fnt";
+ }
header.insert("filename", file);
/* Opening the file */