From 260db92d4975c50fd929399e8d6875a4c854cd5d Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 14 Mar 2011 18:09:32 +0000 Subject: [PATCH] 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 --- src/ports/SkFontHost_FreeType.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 565d1c3..5497734 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(glyph.fImage); size_t dstRB = glyph.rowBytes(); int width = glyph.fWidth; -- 2.7.4