mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 13:44:04 +02:00
Handle the skin: prefix on the font path
This commit is contained in:
parent
af258530db
commit
67ac54e970
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user