shithub: freetype+ttf2subf

Download patch

ref: 29c191cd530ef3351a8f15aa86d8811e820e9fa1
parent: 7bab6ae3e901e282dda489fd34136b65690b0062
author: David Turner <[email protected]>
date: Mon Nov 13 08:03:48 EST 2006

* 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

git/fs: mount .git/fs: mount/attach disallowed
--- 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  <[email protected]>
 
        * include/freetype/ftlcdfil.h, include/internal/ftobjs.h,
--- 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;