Skip to content

Commit 998ca23

Browse files
chethaaseAndroid (Google) Code Review
authored andcommitted
Merge "Fix glyph cropping bug" into jb-mr1-dev
2 parents 7fdaa39 + 5a3ec71 commit 998ca23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/hwui/FontRenderer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ bool CacheTexture::fitBitmap(const SkGlyph& glyph, uint32_t *retOriginX, uint32_
148148
cacheBlock->mX += roundedUpW;
149149
if (mHeight - glyphH >= glyphH) {
150150
// There's enough height left over to create a new CacheBlock
151-
CacheBlock *newBlock = new CacheBlock(oldX, glyphH, roundedUpW,
152-
mHeight - glyphH);
151+
CacheBlock *newBlock = new CacheBlock(oldX, glyphH + TEXTURE_BORDER_SIZE,
152+
roundedUpW, mHeight - glyphH - TEXTURE_BORDER_SIZE);
153153
#if DEBUG_FONT_RENDERER
154154
ALOGD("fitBitmap: Created new block: this, x, y, w, h = %p, %d, %d, %d, %d",
155155
newBlock, newBlock->mX, newBlock->mY,

0 commit comments

Comments
 (0)