[truetype] Fix rasterizer_version logic in sph.

This commit is contained in:
Infinality 2013-01-26 17:05:40 -06:00
parent a5fe359596
commit 97ba5109bd
2 changed files with 27 additions and 15 deletions

View File

@ -1,3 +1,11 @@
2013-01-26 Infinality <infinality@infinality.net>
[truetype] Fix rasterizer_version logic in sph.
* src/truetype/ttsubpix.c: Updated.
(ALWAYS_SKIP_DELTAP_Rules): Remove rule for Trebuchet MS.
(sph_set_tweaks): Fix rasterizer_version logic.
2013-01-26 Infinality <infinality@infinality.net>
[truetype] Align more to ClearType whitepaper for sph.

View File

@ -481,14 +481,12 @@
/* Skip DELTAP instructions if matched. */
#define ALWAYS_SKIP_DELTAP_RULES_SIZE 16
#define ALWAYS_SKIP_DELTAP_RULES_SIZE 15
const SPH_TweakRule ALWAYS_SKIP_DELTAP_Rules
[ALWAYS_SKIP_DELTAP_RULES_SIZE] =
{
{ "Georgia", 0, "Regular", 'k' },
/* fixes problems with W M w */
{ "Trebuchet MS", 0, "Italic", 0 },
/* fix various problems with e in different versions */
{ "Trebuchet MS", 14, "Regular", 'e' },
{ "Trebuchet MS", 13, "Regular", 'e' },
@ -1027,21 +1025,27 @@
TWEAK_RULES( ROUND_NONPIXEL_Y_MOVES );
TWEAK_RULES_EXCEPTIONS( ROUND_NONPIXEL_Y_MOVES );
if ( loader->exec->sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 &&
loader->exec->rasterizer_version != 35 )
if ( loader->exec->sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 )
{
loader->exec->rasterizer_version = 35;
loader->exec->size->cvt_ready = FALSE;
tt_size_ready_bytecode( loader->exec->size,
FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) );
if ( loader->exec->rasterizer_version != 35 )
{
loader->exec->rasterizer_version = 35;
loader->exec->size->cvt_ready = FALSE;
tt_size_ready_bytecode( loader->exec->size,
FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) );
}
else loader->exec->rasterizer_version = 35;
}
else if ( loader->exec->rasterizer_version !=
SPH_OPTION_SET_RASTERIZER_VERSION )
else
{
loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION;
loader->exec->size->cvt_ready = FALSE;
tt_size_ready_bytecode( loader->exec->size,
FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) );
if ( loader->exec->rasterizer_version != SPH_OPTION_SET_RASTERIZER_VERSION )
{
loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION;
loader->exec->size->cvt_ready = FALSE;
tt_size_ready_bytecode( loader->exec->size,
FT_BOOL( loader->load_flags & FT_LOAD_PEDANTIC ) );
}
else loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION;
}
if ( IS_HINTED( loader->load_flags ) )