synced with scummvm

This commit is contained in:
Pawel Kolodziejski 2012-02-10 07:51:41 +01:00
parent cdd1831d23
commit 5fc7ac39ee
97 changed files with 8634 additions and 6380 deletions

View file

@ -176,8 +176,15 @@ bool ThemeParser::parserCallback_font(ParserNode *node) {
return true;
}
// Default to a point size of 12.
int pointsize = 12;
if (node->values.contains("point_size")) {
if (sscanf(node->values["point_size"].c_str(), "%d", &pointsize) != 1 || pointsize <= 0)
return parserError(Common::String::format("Font \"%s\" has invalid point size \"%s\"", node->values["id"].c_str(), node->values["point_size"].c_str()));
}
TextData textDataId = parseTextDataId(node->values["id"]);
if (!_theme->addFont(textDataId, node->values["file"]))
if (!_theme->addFont(textDataId, node->values["file"], node->values["scalable_file"], pointsize))
return parserError("Error loading Font in theme engine.");
return true;