mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 13:29:42 +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() {
|
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();
|
||||||
|
Loading…
Reference in New Issue
Block a user