diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-03-14 18:09:32 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-03-14 18:09:32 +0000 |
commit | 260db92d4975c50fd929399e8d6875a4c854cd5d (patch) | |
tree | 52bcc98f3976e2742ad2482eb2d2adcd74475e8b | |
parent | 8abde0a15d330bda826de3bf0b7bf9a59c514ddf (diff) |
trim 3-byte column at start and end of freetype bitmap
git-svn-id: http://skia.googlecode.com/svn/trunk@935 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/ports/SkFontHost_FreeType.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 565d1c3f99..54977348cd 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -902,10 +902,10 @@ using namespace skia_freetype_support; #endif static void copyFT2LCD16(const SkGlyph& glyph, const FT_Bitmap& bitmap) { - SkASSERT(glyph.fWidth * 3 == bitmap.width); + SkASSERT(glyph.fWidth * 3 == bitmap.width - 6); SkASSERT(glyph.fHeight == bitmap.rows); - const uint8_t* src = bitmap.buffer; + const uint8_t* src = bitmap.buffer + 3; uint16_t* dst = reinterpret_cast<uint16_t*>(glyph.fImage); size_t dstRB = glyph.rowBytes(); int width = glyph.fWidth; |