Support subpixel text when FreeType is built without such support.
authoragl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 28 Jul 2009 00:02:42 +0000 (00:02 +0000)
committeragl@chromium.org <agl@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 28 Jul 2009 00:02:42 +0000 (00:02 +0000)
commitac3011c6d4a885af4f37e22ce94451a778239b0d
tree308f1a2696e435624db0d8d71ccd2f35db6fab83
parente2ca20740b1b3c9e71c085017b64fc9d2f553d93
Support subpixel text when FreeType is built without such support.

On Fedora, at least, FreeType is built without subpixel support. It
tries to simulate subpixel mode by replicating the gray-values three
times. However, it fails to simulate the actions of the low-pass
filter and so doesn't add border around the glyphs. This patch adds a
compile-time constant, which is the number of bytes of filter border.
If this value is zero (because FreeType is simulating subpixel
support), then we add a transparent border ourselves when transforming
from FreeType rendered glyphs to masks.

http://codereview.appspot.com/96171

git-svn-id: http://skia.googlecode.com/svn/trunk@291 2bbb7eff-a529-9590-31e7-b0007b416f81
src/ports/SkFontHost_FreeType_Subpixel.cpp