diff options
Diffstat (limited to 'utils/themeeditor/graphics/rbfont.cpp')
| -rw-r--r-- | utils/themeeditor/graphics/rbfont.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbfont.cpp b/utils/themeeditor/graphics/rbfont.cpp index 2379149..895e327 100644 --- a/utils/themeeditor/graphics/rbfont.cpp +++ b/utils/themeeditor/graphics/rbfont.cpp @@ -39,6 +39,8 @@ RBFont::RBFont(QString file) : valid(false), imageData(0), offsetData(0), widthData(0) { + bool badFile = false; + /* Attempting to locate the correct file name */ if(!QFile::exists(file)) { @@ -52,7 +54,11 @@ RBFont::RBFont(QString file) settings.endGroup(); if(!QFile::exists(file)) + { file = ":/fonts/08-Schumacher-Clean.fnt"; + + badFile = true; + } } header.insert("filename", file); @@ -65,6 +71,9 @@ RBFont::RBFont(QString file) widthData = cache->widthData; header = cache->header; + if(!badFile) + valid = true; + return; } @@ -162,6 +171,9 @@ RBFont::RBFont(QString file) cache->header = header; RBFontCache::insert(file, cache); + if(!badFile) + valid = true; + } RBFont::~RBFont() |