Merge pull request #7064 from kyokomi/TextReader_filePath_fix

Fix bug for TextReader #setFontName.
This commit is contained in:
minggo 2014-06-18 10:36:29 +08:00
commit 8a0a6a2ded
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@ namespace cocostudio
bool fn = DICTOOL->checkObjectExist_json(options, "fontName");
if (fn)
{
label->setFontName(DICTOOL->getStringValue_json(options, "fontName"));
std::string fontName = DICTOOL->getStringValue_json(options, "fontName");
std::string fontFilePath = jsonPath.append(fontName);
label->setFontName(fontFilePath);
}
bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth");
bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight");