void
FTDemo_Update_Current_Flags(
FTDemo_Handle* handle )
{
FT_UInt32 flags,
target;
flags = FT_LOAD_DEFAULT; /*
really 0 */
flags |=
FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH;
if ( handle->autohint )
flags |=
FT_LOAD_FORCE_AUTOHINT;
if ( !handle->use_sbits )
flags |=
FT_LOAD_NO_BITMAP;
if ( handle->hinted )
{
target = 0;
if (
handle->antialias )
{
switch (
handle->lcd_mode )
{
case LCD_MODE_LIGHT:
target = FT_LOAD_TARGET_LIGHT;
break;
case LCD_MODE_RGB:
case LCD_MODE_BGR:
target = FT_LOAD_TARGET_LCD;
break;
case LCD_MODE_VRGB:
case LCD_MODE_VBGR:
target = FT_LOAD_TARGET_LCD_V;
break;
default:
target = FT_LOAD_TARGET_NORMAL;
}
}
else
target =
FT_LOAD_TARGET_MONO;
flags |= target;
}
else
flags |=
FT_LOAD_NO_HINTING;
handle->image_type.flags =
flags;
handle->string_reload
= 1;
}
|