[base] Empower `FT_Library_SetLcdFilterWeights'.
* src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter in addition to setting weights. (FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and FT_FORCE_LEGACY_LCD_FILTER. * include/freetype/ftlcdfil.h: Documentation update.
This commit is contained in:
parent
441506656f
commit
32760d33d0
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2016-01-14 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
[base] Empower `FT_Library_SetLcdFilterWeights'.
|
||||
|
||||
* src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights): Enable filter
|
||||
in addition to setting weights.
|
||||
(FT_Library_SetLcdFilter): Clean out FT_FORCE_LIGHT_LCD_FILTER and
|
||||
FT_FORCE_LEGACY_LCD_FILTER.
|
||||
* include/freetype/ftlcdfil.h: Documentation update.
|
||||
|
||||
2016-01-12 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
Don't use macro names that start with `_[A-Z]' [3/3].
|
||||
|
@ -250,8 +250,8 @@ FT_BEGIN_HEADER
|
||||
* FT_Library_SetLcdFilterWeights
|
||||
*
|
||||
* @description:
|
||||
* Use this function to override default or light filter weights
|
||||
* selected by @FT_Library_SetLcdFilter.
|
||||
* This function can be used to enable LCD filter with custom weights,
|
||||
* instead of using presets in @FT_Library_SetLcdFilter.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
@ -271,9 +271,6 @@ FT_BEGIN_HEADER
|
||||
* defined in your build of the library, which should correspond to all
|
||||
* default builds of FreeType.
|
||||
*
|
||||
* This function must be called after @FT_Library_SetLcdFilter to have
|
||||
* any effect on default or light filter.
|
||||
*
|
||||
* @since:
|
||||
* 2.4.0
|
||||
*/
|
||||
|
@ -296,6 +296,8 @@
|
||||
return FT_THROW( Invalid_Argument );
|
||||
|
||||
ft_memcpy( library->lcd_weights, weights, 5 );
|
||||
library->lcd_filter_func = _ft_lcd_filter_fir;
|
||||
library->lcd_extra = 2;
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
@ -322,25 +324,9 @@
|
||||
break;
|
||||
|
||||
case FT_LCD_FILTER_DEFAULT:
|
||||
#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 )
|
||||
|
||||
ft_memcpy( library->lcd_weights, light_filter, 5 );
|
||||
library->lcd_filter_func = _ft_lcd_filter_fir;
|
||||
library->lcd_extra = 2;
|
||||
|
||||
#else
|
||||
|
||||
ft_memcpy( library->lcd_weights, default_filter, 5 );
|
||||
library->lcd_filter_func = _ft_lcd_filter_fir;
|
||||
library->lcd_extra = 2;
|
||||
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
||||
case FT_LCD_FILTER_LIGHT:
|
||||
|
Loading…
Reference in New Issue
Block a user