1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 12:48:26 +02: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() {
const string path = skinConfStr["font"];
if (font) {
delete font;
font = NULL;
}
string path = skinConfStr["font"];
if (!path.empty()) {
unsigned int size = skinConfInt["fontsize"];
if (!size)
size = 12;
if (path.substr(0,5)=="skin:")
path = sc.getSkinFilePath(path.substr(5, path.length()));
font = new Font(path, size);
} else {
font = Font::defaultFont();