From 4c93399155e88c415df05a46a14625ebf95c5ddc Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 18 Jan 2008 05:32:55 +0000 Subject: [PATCH] * 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. --- ChangeLog | 10 +++++++++- include/freetype/freetype.h | 10 ++++++---- src/base/ftlcdfil.c | 6 +++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 69263fe4c..ba23eceb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-01-18 Sylvain Pasche + + * 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 * 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 0a013e812..fcafdc347 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. */ /* */ /* */ - /* 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 f40bbeae5..5f1fa0bdb 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;