mirror of https://github.com/axmolengine/axmol.git
Font atlas texture initialization delayed (#19592)
This commit is contained in:
parent
df88380394
commit
0a9e66a16c
|
@ -73,8 +73,6 @@ FontAtlas::FontAtlas(Font &theFont)
|
|||
_letterPadding += 2 * FontFreeType::DistanceMapSpread;
|
||||
}
|
||||
|
||||
reinit();
|
||||
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
auto eventDispatcher = Director::getInstance()->getEventDispatcher();
|
||||
|
||||
|
@ -370,7 +368,10 @@ bool FontAtlas::prepareLetterDefinitions(const std::u32string& utf32Text)
|
|||
if (_fontFreeType == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_currentPageData)
|
||||
reinit();
|
||||
|
||||
std::unordered_map<unsigned int, unsigned int> codeMapOfNewChar;
|
||||
findNewCharacters(utf32Text, codeMapOfNewChar);
|
||||
|
|
Loading…
Reference in New Issue