From d7199204bd5eab7813ccb4258c012fa667470569 Mon Sep 17 00:00:00 2001 From: kyokomi Date: Sat, 14 Jun 2014 23:56:12 +0900 Subject: [PATCH] Fix bug for TextReader #setFontName. --- .../cocostudio/WidgetReader/TextReader/TextReader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp index 08144322b4..c76f562f19 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp @@ -51,7 +51,10 @@ namespace cocostudio bool fn = DICTOOL->checkObjectExist_json(options, "fontName"); 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 ah = DICTOOL->checkObjectExist_json(options, "areaHeight");