diff --git a/frameworks/font/glyphs_manager.cpp b/frameworks/font/glyphs_manager.cpp index 079986f4a5332a2f5eaaab3ca865e310cea32a81..212b244dd3f2af23935174e0df5099ee9fe3c59b 100755 --- a/frameworks/font/glyphs_manager.cpp +++ b/frameworks/font/glyphs_manager.cpp @@ -135,8 +135,7 @@ GlyphNode* GlyphsManager::GetNodeFromFile(uint32_t unicode, uint8_t fontId) uint8_t* tmpIndexCache = curIndexCache_; uint32_t tmpGlyphNodeSectionStart = curGlyphNodeSectionStart_; while (fontId_ != fontId) { - SetCurrentFontId(fontId); - if (!isFontIdSet_) { + if (SetCurrentFontId(fontId) == INVALID_RET_VALUE) { return nullptr; } tmpIndexCache = curIndexCache_;