Commit 29c191cd530ef3351a8f15aa86d8811e820e9fa1

David Turner 2006-11-13T13:03:48

* 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

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;