From 1eeaf0ba2381f84ffd889f56303cbe0d1886bb21 Mon Sep 17 00:00:00 2001 From: "caryclark@google.com" Date: Wed, 22 Jun 2011 13:19:43 +0000 Subject: Add support for 8 bits/component glyphs, to better match the fonts produced by CoreText on OS/X. M include/config/SkUserConfig.h M include/core/SkMask.h M include/core/SkScalerContext.h M src/core/SkBlitter_ARGB32.cpp M src/core/SkScalerContext.cpp M src/core/SkPaint.cpp M src/gpu/SkGrFontScaler.cpp M src/ports/SkFontHost_mac_coretext.cpp M src/ports/SkFontHost_mac.cpp M gpu/include/GrTypes.h M gpu/src/GrAtlas.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@1672 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkScalerContext.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/core/SkScalerContext.h') diff --git a/include/core/SkScalerContext.h b/include/core/SkScalerContext.h index cbbbdf0357..d7b5eece12 100644 --- a/include/core/SkScalerContext.h +++ b/include/core/SkScalerContext.h @@ -60,7 +60,9 @@ struct SkGlyph { unsigned rb = width; if (SkMask::kBW_Format == format) { rb = (rb + 7) >> 3; - } else if (SkMask::kARGB32_Format == format) { + } else if (SkMask::kARGB32_Format == format || + SkMask::kLCD32_Format == format) + { rb <<= 2; } else if (SkMask::kLCD16_Format == format) { rb = SkAlign4(rb << 1); -- cgit v1.2.3