From f05053329bcf6a295d6dcad2398bb7409615695b Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 11 Oct 2016 18:03:05 +0300 Subject: [PATCH] fix font rendering position --- cocos/2d/CCFontAtlas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCFontAtlas.cpp b/cocos/2d/CCFontAtlas.cpp index 7936a92c3e..2bfc1247ec 100644 --- a/cocos/2d/CCFontAtlas.cpp +++ b/cocos/2d/CCFontAtlas.cpp @@ -353,7 +353,7 @@ bool FontAtlas::prepareLetterDefinitions(const std::u16string& utf16Text) tempDef.validDefinition = true; tempDef.width = tempRect.size.width + _letterPadding + _letterEdgeExtend; tempDef.height = tempRect.size.height + _letterPadding + _letterEdgeExtend; - tempDef.offsetX = tempRect.origin.x + adjustForDistanceMap + adjustForExtend; + tempDef.offsetX = tempRect.origin.x + adjustForDistanceMap - adjustForExtend; tempDef.offsetY = _fontAscender + tempRect.origin.y - adjustForDistanceMap - adjustForExtend; if (_currentPageOrigX + tempDef.width > CacheTextureWidth)