ref: f7cc181425bbcd24f4005f5d348b9e0a2a269727
parent: d829ff768be362f228628600d498d18f0537e708
author: David Turner <[email protected]>
date: Tue Nov 15 12:30:56 EST 2005
* 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. !
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,18 @@
+2005-11-15 David Turner <[email protected]>
+
+ * 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 <[email protected]>
* 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.
--- 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 )
+ if ( z >= ( 1L << 1 ) )
+ {
+ z >>= 1;
shift += 1;
+ }
- if ( shift < 28 )
+ if ( shift <= 27 )
{
- shift = 28 - shift;
+ 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;
--- 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 ) */
/*************************************************************************/