diff options
Diffstat (limited to 'utils/themeeditor/graphics/rbfont.cpp')
-rw-r--r-- | utils/themeeditor/graphics/rbfont.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/utils/themeeditor/graphics/rbfont.cpp b/utils/themeeditor/graphics/rbfont.cpp index e59c79a970..1c2739d118 100644 --- a/utils/themeeditor/graphics/rbfont.cpp +++ b/utils/themeeditor/graphics/rbfont.cpp | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <QPainter> | 27 | #include <QPainter> |
28 | #include <QBitmap> | 28 | #include <QBitmap> |
29 | #include <QImage> | 29 | #include <QImage> |
30 | #include <QSettings> | ||
30 | 31 | ||
31 | quint16 RBFont::maxFontSizeFor16BitOffsets = 0xFFDB; | 32 | quint16 RBFont::maxFontSizeFor16BitOffsets = 0xFFDB; |
32 | 33 | ||
@@ -36,7 +37,19 @@ RBFont::RBFont(QString file) | |||
36 | 37 | ||
37 | /* Attempting to locate the correct file name */ | 38 | /* Attempting to locate the correct file name */ |
38 | if(!QFile::exists(file)) | 39 | if(!QFile::exists(file)) |
39 | file = ":/fonts/08-Schumacher-Clean.fnt"; | 40 | { |
41 | /* Checking in the fonts repository */ | ||
42 | QSettings settings; | ||
43 | settings.beginGroup("RBFont"); | ||
44 | |||
45 | file = file.split("/").last(); | ||
46 | file = settings.value("fontDir", "").toString() + "/" + file; | ||
47 | |||
48 | settings.endGroup(); | ||
49 | |||
50 | if(!QFile::exists(file)) | ||
51 | file = ":/fonts/08-Schumacher-Clean.fnt"; | ||
52 | } | ||
40 | header.insert("filename", file); | 53 | header.insert("filename", file); |
41 | 54 | ||
42 | /* Opening the file */ | 55 | /* Opening the file */ |