1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-05 04:41:06 +03:00

Handle the skin: prefix on the font path

This commit is contained in:
Paul Cercueil 2014-01-15 22:02:30 +01:00
parent af258530db
commit 67ac54e970

View File

@ -349,11 +349,18 @@ void GMenu2X::initBG() {
} }
void GMenu2X::initFont() { void GMenu2X::initFont() {
const string path = skinConfStr["font"]; if (font) {
delete font;
font = NULL;
}
string path = skinConfStr["font"];
if (!path.empty()) { if (!path.empty()) {
unsigned int size = skinConfInt["fontsize"]; unsigned int size = skinConfInt["fontsize"];
if (!size) if (!size)
size = 12; size = 12;
if (path.substr(0,5)=="skin:")
path = sc.getSkinFilePath(path.substr(5, path.length()));
font = new Font(path, size); font = new Font(path, size);
} else { } else {
font = Font::defaultFont(); font = Font::defaultFont();