[truetype] Fix rasterizer_version logic in sph.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
diff --git a/ChangeLog b/ChangeLog
index fab11e8..b26aaae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
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.
* include/freetype/internal/tttypes.h (TT_FaceRec): Add flags
diff --git a/src/truetype/ttsubpix.c b/src/truetype/ttsubpix.c
index 29eda92..6d88ef0 100644
--- a/src/truetype/ttsubpix.c
+++ b/src/truetype/ttsubpix.c
@@ -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 ) )