fixed logical error in Label::updateFont.

This commit is contained in:
Dhilan007 2014-03-31 15:29:24 +08:00
parent cffdb129c9
commit 774debd142
1 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,7 @@
#include "CCEventDispatcher.h" #include "CCEventDispatcher.h"
#include "CCEventType.h" #include "CCEventType.h"
#include "CCEventCustom.h" #include "CCEventCustom.h"
#include "platform/CCFileUtils.h"
NS_CC_BEGIN NS_CC_BEGIN
@ -344,6 +345,7 @@ void Label::reset()
_shadowEnabled = false; _shadowEnabled = false;
_clipEnabled = false; _clipEnabled = false;
_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
} }
void Label::updateShaderProgram() void Label::updateShaderProgram()
@ -1051,7 +1053,7 @@ void Label::updateContent()
void Label::updateFont() void Label::updateFont()
{ {
if (_fontName.find('.') != _fontName.npos) if (FileUtils::getInstance()->isFileExist(_fontName))
{ {
_fontConfig.fontFilePath = _fontName; _fontConfig.fontFilePath = _fontName;
_fontConfig.fontSize = _fontSize; _fontConfig.fontSize = _fontSize;