Commit 4c93399155e88c415df05a46a14625ebf95c5ddc

Werner Lemberg 2008-01-18T05:32:55

* src/base/ftlcdfil.c (_ft_lcd_filter_legacy): Updated comment to mention intra-pixel algorithm. * include/freetype/freetype.h (FT_Render_Mode): Mention that FT_Library_SetLcdFilter can be used to reduce fringes.

diff --git a/ChangeLog b/ChangeLog
index 69263fe..ba23ece 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-18  Sylvain Pasche  <sylvain.pasche@gmail.com>
+
+	* src/base/ftlcdfil.c (_ft_lcd_filter_legacy): Updated comment to
+	mention intra-pixel algorithm.
+
+	* include/freetype/freetype.h (FT_Render_Mode): Mention that
+	FT_Library_SetLcdFilter can be used to reduce fringes.
+
 2008-01-16  Werner Lemberg  <wl@gnu.org>
 
 	* src/raster/ftraster.c (ft_black_render): Check `outline' before
@@ -2923,7 +2931,7 @@
 
 ----------------------------------------------------------------------------
 
-Copyright 2006, 2007 by
+Copyright 2006, 2007, 2008 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 0a013e8..fcafdc3 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType high-level API and common types (specification only).       */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by       */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -2545,9 +2545,11 @@ FT_BEGIN_HEADER
   /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */
   /*                                                                       */
   /* <Note>                                                                */
-  /*   The LCD-optimized glyph bitmaps produced by FT_Render_Glyph are     */
-  /*   _not_ _filtered_ to reduce color-fringes.  It is up to the caller   */
-  /*   to perform this pass.                                               */
+  /*   The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be  */
+  /*   filtered to reduce color-fringes by using @FT_Library_SetLcdFilter  */
+  /*   (not active in the default builds).  It is up to the caller to      */
+  /*   either call @FT_Library_SetLcdFilter (if available) or do the       */
+  /*   filtering itself.                                                   */
   /*                                                                       */
   typedef enum  FT_Render_Mode_
   {
diff --git a/src/base/ftlcdfil.c b/src/base/ftlcdfil.c
index f40bbea..5f1fa0b 100644
--- a/src/base/ftlcdfil.c
+++ b/src/base/ftlcdfil.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType API for color filtering of subpixel bitmap glyphs (body).   */
 /*                                                                         */
-/*  Copyright 2006 by                                                      */
+/*  Copyright 2006, 2008 by                                                */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -161,7 +161,7 @@
 
 #ifdef USE_LEGACY
 
-  /* FIR filter used by the default and light filters */
+  /* intra-pixel filter used by the legacy filter */
   static void
   _ft_lcd_filter_legacy( FT_Bitmap*      bitmap,
                          FT_Render_Mode  mode,
@@ -181,7 +181,7 @@
     FT_UNUSED( library );
 
 
-    /* horizontal in-place FIR filter */
+    /* horizontal in-place intra-pixel filter */
     if ( mode == FT_RENDER_MODE_LCD && width >= 3 )
     {
       FT_Byte*  line = bitmap->buffer;