Fix bug for TextReader #setFontName.

This commit is contained in:
kyokomi 2014-06-14 23:56:12 +09:00
parent 7c789e6a36
commit d7199204bd
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,10 @@ namespace cocostudio
bool fn = DICTOOL->checkObjectExist_json(options, "fontName"); bool fn = DICTOOL->checkObjectExist_json(options, "fontName");
if (fn) if (fn)
{ {
label->setFontName(DICTOOL->getStringValue_json(options, "fontName")); std::string tp_c = jsonPath;
const char* cmfPath = DICTOOL->getStringValue_json(options, "fontName");
const char* cmf_tp = tp_c.append(cmfPath).c_str();
label->setFontName(cmf_tp);
} }
bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth");
bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight");