* 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. !
This commit is contained in:
David Turner 2005-11-15 17:30:56 +00:00
parent d829ff768b
commit f7cc181425
3 changed files with 25 additions and 10 deletions

View File

@ -1,9 +1,18 @@
2005-11-15 David Turner <david@freetype.org>
* 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 <wl@gnu.org>
* 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.

View File

@ -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;

View File

@ -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 ) */
/*************************************************************************/