* src/base/ftlcdfil.c: added support for FT_FORCE_LIGHT_LCD_FILTER and FT_FORCE_LEGACY_LCD_FILTER at compile time. Define these macros when building the library to change the default LCD filter to be used. This is only useful for experimentation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
diff --git a/ChangeLog b/ChangeLog
index 1bb859d..7d0e404 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@
since the interpreter "enhancements" are still too buggy for
general use
+ * src/base/ftlcdfil.c: added support for FT_FORCE_LIGHT_LCD_FILTER
+ and FT_FORCE_LEGACY_LCD_FILTER at compile time. Define these macros
+ when building the library to change the default LCD filter to be
+ used. This is only useful for experimentation
+
2006-11-10 David Turner <david@freetype.org>
* include/freetype/ftlcdfil.h, include/internal/ftobjs.h,
diff --git a/src/base/ftlcdfil.c b/src/base/ftlcdfil.c
index 4529cf2..255e581 100644
--- a/src/base/ftlcdfil.c
+++ b/src/base/ftlcdfil.c
@@ -24,6 +24,7 @@
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+/* define USE_LEGACY to implement the legacy filter */
#define USE_LEGACY
/* FIR filter used by the default and light filters */
@@ -274,9 +275,13 @@
break;
case FT_LCD_FILTER_DEFAULT:
-#if 0 /* DEBUGGING */
+#if defined(FT_FORCE_LEGACY_LCD_FILTER)
library->lcd_filter_func = _ft_lcd_filter_legacy;
library->lcd_extra = 0;
+#elif defined(FT_FORCE_LIGHT_LCD_FILTER)
+ memcpy( library->lcd_weights, default_filter, 5 );
+ library->lcd_filter_func = _ft_lcd_filter_fir;
+ library->lcd_extra = 2;
#else
memcpy( library->lcd_weights, default_filter, 5 );
library->lcd_filter_func = _ft_lcd_filter_fir;