This commit is contained in:
minggo 2019-10-17 11:14:04 +08:00 committed by GitHub
parent fae3ef8e48
commit d29adb3180
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -60,6 +60,13 @@ FontAtlas::FontAtlas(Font &theFont)
{
_letterPadding += 2 * FontFreeType::DistanceMapSpread;
}
auto outlineSize = _fontFreeType->getOutlineSize();
if (outlineSize > 0)
{
_lineHeight += 2 * outlineSize;
}
#if CC_ENABLE_CACHE_TEXTURE_DATA
auto eventDispatcher = Director::getInstance()->getEventDispatcher();
@ -87,7 +94,6 @@ void FontAtlas::reinit()
auto outlineSize = _fontFreeType->getOutlineSize();
if(outlineSize > 0)
{
_lineHeight += 2 * outlineSize;
_currentPageDataSize *= 2;
_currentPageDataSizeRGBA = _currentPageDataSize * 2;