diff --git a/cocos/2d/CCFontFreeType.cpp b/cocos/2d/CCFontFreeType.cpp index 074d9c4d1f..3312bbc8dc 100644 --- a/cocos/2d/CCFontFreeType.cpp +++ b/cocos/2d/CCFontFreeType.cpp @@ -312,6 +312,9 @@ unsigned char* FontFreeType::getGlyphBitmap(unsigned short theChar, long &outWid auto blendWidth = MAX(outlineMaxX, glyphMaxX) - blendImageMinX; auto blendHeight = blendImageMaxY - MIN(outlineMinY, glyphMinY); + outRect.origin.x = blendImageMinX; + outRect.origin.y = -blendImageMaxY; + long index, index2; auto blendImage = new unsigned char[blendWidth * blendHeight * 2]; memset(blendImage, 0, blendWidth * blendHeight * 2);