Add flag to enable bitmap strikes.
http://codereview.appspot.com/183096
git-svn-id: http://skia.googlecode.com/svn/trunk@466 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index c7e310e..5eb36f6 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -376,10 +376,7 @@
break;
}
- if (fRec.fMaskFormat != SkMask::kBW_Format) {
- // If the user requested anti-aliasing then we don't use bitmap
- // strikes in the font. The consensus among our Japanese users is
- // that this results in the best quality.
+ if (!fRec.fUseEmbeddedBitmapText) {
loadFlags |= FT_LOAD_NO_BITMAP;
}
@@ -708,7 +705,9 @@
dst += dstRowBytes;
}
} else if (fFace->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_MONO &&
- glyph.fMaskFormat == SkMask::kA8_Format) {
+ (glyph.fMaskFormat == SkMask::kA8_Format ||
+ glyph.fMaskFormat == SkMask::kHorizontalLCD_Format ||
+ glyph.fMaskFormat == SkMask::kVerticalLCD_Format)) {
for (int y = 0; y < fFace->glyph->bitmap.rows; ++y) {
uint8_t byte = 0;
int bits = 0;