mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Remove unused SUBPIXEL_RENDERING code
This commit is contained in:
parent
4a4c0c9ddd
commit
1d6d79a864
@ -3032,14 +3032,6 @@ FT_BEGIN_HEADER
|
||||
/* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Should you define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your */
|
||||
/* `ftoption.h', which enables patented ClearType-style rendering, */
|
||||
/* the LCD-optimized glyph bitmaps should be filtered to reduce color */
|
||||
/* fringes inherent to this technology. You can either set up LCD */
|
||||
/* filtering with @FT_Library_SetLcdFilter or @FT_Face_Properties, */
|
||||
/* or do the filtering yourself. The default FreeType LCD rendering */
|
||||
/* technology does not require filtering. */
|
||||
/* */
|
||||
/* The selected render mode only affects vector glyphs of a font. */
|
||||
/* Embedded bitmaps often have a different pixel mode like */
|
||||
/* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform */
|
||||
|
@ -1864,11 +1864,6 @@
|
||||
internal->refcount = 1;
|
||||
|
||||
internal->no_stem_darkening = -1;
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
/* Per-face filtering can only be set up by FT_Face_Properties */
|
||||
internal->lcd_filter_func = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( aface )
|
||||
@ -2877,18 +2872,8 @@
|
||||
}
|
||||
else if ( properties->tag == FT_PARAM_TAG_LCD_FILTER_WEIGHTS )
|
||||
{
|
||||
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
if ( properties->data )
|
||||
{
|
||||
ft_memcpy( face->internal->lcd_weights,
|
||||
properties->data,
|
||||
FT_LCD_FILTER_FIVE_TAPS );
|
||||
face->internal->lcd_filter_func = ft_lcd_filter_fir;
|
||||
}
|
||||
#else
|
||||
error = FT_THROW( Unimplemented_Feature );
|
||||
goto Exit;
|
||||
#endif
|
||||
}
|
||||
else if ( properties->tag == FT_PARAM_TAG_RANDOM_SEED )
|
||||
{
|
||||
|
@ -270,27 +270,6 @@ FT_BEGIN_HEADER
|
||||
FT_CMap_Done( FT_CMap cmap );
|
||||
|
||||
|
||||
/* adds LCD padding to Min and Max boundaries */
|
||||
FT_BASE( void )
|
||||
ft_lcd_padding( FT_Pos* Min,
|
||||
FT_Pos* Max,
|
||||
FT_GlyphSlot slot );
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
|
||||
typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap,
|
||||
FT_Render_Mode render_mode,
|
||||
FT_Byte* weights );
|
||||
|
||||
|
||||
/* This is the default LCD filter, an in-place, 5-tap FIR filter. */
|
||||
FT_BASE( void )
|
||||
ft_lcd_filter_fir( FT_Bitmap* bitmap,
|
||||
FT_Render_Mode mode,
|
||||
FT_LcdFiveTapFilter weights );
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
@ -374,11 +353,6 @@ FT_BEGIN_HEADER
|
||||
FT_Char no_stem_darkening;
|
||||
FT_Int32 random_seed;
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */
|
||||
FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
|
||||
#endif
|
||||
|
||||
FT_Int refcount;
|
||||
|
||||
} FT_Face_InternalRec;
|
||||
@ -888,11 +862,6 @@ FT_BEGIN_HEADER
|
||||
|
||||
FT_DebugHook_Func debug_hooks[4];
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */
|
||||
FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
|
||||
#endif
|
||||
|
||||
FT_Int refcount;
|
||||
|
||||
} FT_LibraryRec;
|
||||
|
@ -108,23 +108,6 @@ FT_BEGIN_HEADER
|
||||
#undef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Uncomment the line below if you want to activate LCD rendering */
|
||||
/* technology similar to ClearType in this build of the library. This */
|
||||
/* technology triples the resolution in the direction color subpixels. */
|
||||
/* To mitigate color fringes inherent to this technology, you also need */
|
||||
/* to explicitly set up LCD filtering. */
|
||||
/* */
|
||||
/* Note that this feature is covered by several Microsoft patents */
|
||||
/* and should not be activated in any default build of the library. */
|
||||
/* When this macro is not defined, FreeType offers alternative LCD */
|
||||
/* rendering technology that produces excellent output without LCD */
|
||||
/* filtering. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Many compilers provide a non-ANSI 64-bit data type that can be used */
|
||||
|
@ -160,68 +160,6 @@
|
||||
params.flags = FT_RASTER_FLAG_AA;
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
|
||||
|
||||
/* implode outline if needed */
|
||||
{
|
||||
FT_Vector* points = outline->points;
|
||||
FT_Vector* points_end = points + outline->n_points;
|
||||
FT_Vector* vec;
|
||||
|
||||
|
||||
if ( hmul )
|
||||
for ( vec = points; vec < points_end; vec++ )
|
||||
vec->x *= 3;
|
||||
|
||||
if ( vmul )
|
||||
for ( vec = points; vec < points_end; vec++ )
|
||||
vec->y *= 3;
|
||||
}
|
||||
|
||||
/* render outline into the bitmap */
|
||||
error = render->raster_render( render->raster, ¶ms );
|
||||
|
||||
/* deflate outline if needed */
|
||||
{
|
||||
FT_Vector* points = outline->points;
|
||||
FT_Vector* points_end = points + outline->n_points;
|
||||
FT_Vector* vec;
|
||||
|
||||
|
||||
if ( hmul )
|
||||
for ( vec = points; vec < points_end; vec++ )
|
||||
vec->x /= 3;
|
||||
|
||||
if ( vmul )
|
||||
for ( vec = points; vec < points_end; vec++ )
|
||||
vec->y /= 3;
|
||||
}
|
||||
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
/* finally apply filtering */
|
||||
if ( hmul || vmul )
|
||||
{
|
||||
FT_Byte* lcd_weights;
|
||||
FT_Bitmap_LcdFilterFunc lcd_filter_func;
|
||||
|
||||
|
||||
/* Per-face LCD filtering takes priority if set up. */
|
||||
if ( slot->face && slot->face->internal->lcd_filter_func )
|
||||
{
|
||||
lcd_weights = slot->face->internal->lcd_weights;
|
||||
lcd_filter_func = slot->face->internal->lcd_filter_func;
|
||||
}
|
||||
else
|
||||
{
|
||||
lcd_weights = slot->library->lcd_weights;
|
||||
lcd_filter_func = slot->library->lcd_filter_func;
|
||||
}
|
||||
|
||||
if ( lcd_filter_func )
|
||||
lcd_filter_func( bitmap, mode, lcd_weights );
|
||||
}
|
||||
|
||||
#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
|
||||
|
||||
if ( hmul ) /* lcd */
|
||||
|
Loading…
x
Reference in New Issue
Block a user