summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-06 20:23:27 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-06 20:23:27 +0000
commiteccc2bd009e967e45d38a573080d13a1339eb0a6 (patch)
tree810341f795f88ab63147d3ed545c1eb812347ebc /utils/themeeditor/graphics
parent120f3e1c10c36fd5d174741d0da81ba84fc79ae3 (diff)
downloadrockbox-eccc2bd009e967e45d38a573080d13a1339eb0a6.tar.gz
rockbox-eccc2bd009e967e45d38a573080d13a1339eb0a6.zip
Theme Editor: Added font directory option in preferences dialog, renderer will now search that directory for fonts if they're not found in the project directory
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27322 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics')
-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 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
31quint16 RBFont::maxFontSizeFor16BitOffsets = 0xFFDB; 32quint16 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 */