fix font rendering position

This commit is contained in:
Sergey 2016-10-11 18:03:05 +03:00
parent 93609ff586
commit f05053329b
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ bool FontAtlas::prepareLetterDefinitions(const std::u16string& utf16Text)
tempDef.validDefinition = true; tempDef.validDefinition = true;
tempDef.width = tempRect.size.width + _letterPadding + _letterEdgeExtend; tempDef.width = tempRect.size.width + _letterPadding + _letterEdgeExtend;
tempDef.height = tempRect.size.height + _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; tempDef.offsetY = _fontAscender + tempRect.origin.y - adjustForDistanceMap - adjustForExtend;
if (_currentPageOrigX + tempDef.width > CacheTextureWidth) if (_currentPageOrigX + tempDef.width > CacheTextureWidth)