diff --git a/ChangeLog b/ChangeLog index 8aa790d2f..360b67d7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,18 @@ +2005-11-15 David Turner + + * src/base/fttrigon.c (ft_trig_prenorm): fixed a bug that created + invalid computations, resulting in very weird bugs in TrueType + bytecode hinted fonts + + * src/truetype/ttinterp.c: redefined FT_UNUSED_EXEC to not perform + a structure copy each time. Wooot. ! + 2005-11-11 Werner Lemberg * src/cache/ftccache.c (FTC_Cache_Clear), src/cache/ftcmanag.c (FTC_Manager_Check): Remove FT_EXPORT_DEF tag. - * src/base/ftcalc.c (FT_Add64): Remove FT_EXPORT_DEF tag. + * src/base/ftcalc.c (FT_Add64): Remove FT_EXPORT_DEF tag. (FT_Div64by32, FT_Sqrt32): Commented out. Unused. * include/freetype/internal/ftcalc.h (SQRT_32): Removed. Unused. diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c index b25a152fb..9f513946b 100644 --- a/src/base/fttrigon.c +++ b/src/base/fttrigon.c @@ -110,7 +110,6 @@ shift = 0; #if 1 - /* determine msb bit index in `shift' */ if ( z >= ( 1L << 16 ) ) { @@ -132,18 +131,21 @@ z >>= 2; shift += 2; } - if ( z >= 1 ) - shift += 1; - - if ( shift < 28 ) + if ( z >= ( 1L << 1 ) ) { - shift = 28 - shift; + z >>= 1; + shift += 1; + } + + if ( shift <= 27 ) + { + shift = 27 - shift; vec->x = x << shift; vec->y = y << shift; } - else if ( shift > 28 ) + else { - shift -= 28; + shift -= 27; vec->x = x >> shift; vec->y = y >> shift; shift = -shift; diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index b61cfa67b..73ff7f8d2 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -94,10 +94,14 @@ #define CUR (*exc) /* see ttobjs.h */ +#define FT_UNUSED_EXEC FT_UNUSED(exc) + #else /* static implementation */ #define CUR cur +#define FT_UNUSED_EXEC int __dummy=__dummy + static TT_ExecContextRec cur; /* static exec. context variable */ @@ -120,7 +124,7 @@ /* This macro is used whenever `exec' is unused in a function, to avoid */ /* stupid warnings from pedantic compilers. */ /* */ -#define FT_UNUSED_EXEC FT_UNUSED( CUR ) +/* #define FT_UNUSED_EXEC FT_UNUSED( CUR ) */ /*************************************************************************/