FreeType: don't use bitmap strikes when antialiasing
authoragl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 7 Aug 2009 19:19:23 +0000 (19:19 +0000)
committeragl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 7 Aug 2009 19:19:23 +0000 (19:19 +0000)
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.

http://code.google.com/p/chromium/issues/detail?id=18333

http://codereview.appspot.com/105050

git-svn-id: http://skia.googlecode.com/svn/trunk@310 2bbb7eff-a529-9590-31e7-b0007b416f81

src/ports/SkFontHost_FreeType.cpp

index 77f4b23275de1d4e52b0e979fce8d810189354f8..e09e542819732f14323f939f18432bb4a0120d85 100644 (file)
@@ -376,6 +376,13 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(const SkDescriptor* desc)
             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.
+            loadFlags |= FT_LOAD_NO_BITMAP;
+        }
+
         fLoadGlyphFlags = loadFlags;
     }