mirror of https://github.com/axmolengine/axmol.git
Merge pull request #8977 from pipu/v3_Modify_TextReader
Modify that parsing attribute "fontName" of TextReader
This commit is contained in:
commit
6c67c6921d
|
@ -163,15 +163,7 @@ namespace cocostudio
|
||||||
label->setFontSize(fontSize);
|
label->setFontSize(fontSize);
|
||||||
|
|
||||||
std::string fontName = options.has_fontname() ? options.fontname() : "微软雅黑";
|
std::string fontName = options.has_fontname() ? options.fontname() : "微软雅黑";
|
||||||
|
label->setFontName(fontName);
|
||||||
std::string fontFilePath = protocolBuffersPath.append(fontName);
|
|
||||||
if (FileUtils::getInstance()->isFileExist(fontFilePath))
|
|
||||||
{
|
|
||||||
label->setFontName(fontFilePath);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
label->setFontName(fontName);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool aw = options.has_areawidth();
|
bool aw = options.has_areawidth();
|
||||||
bool ah = options.has_areaheight();
|
bool ah = options.has_areaheight();
|
||||||
|
|
Loading…
Reference in New Issue