Commit c40a7e2d50fa71ca337fba3b58f424b67550e689

David Turner 2001-12-19T19:17:35

* include/freetype/cache/ftcache.h: added comments to indicate that some of the exported functions should only be used by applications that need to implement custom cache types * src/truetype/ttgload.c: fixed a nasty bug that prevent composites from loading correctly. Believe it or not, this was due to an invalid macro definition !!

diff --git a/ChangeLog b/ChangeLog
index 10d701a..840ace8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2001-12-19  David Turner  <david@freetype.org>
 
+        * include/freetype/cache/ftcache.h: added comments to indicate that
+        some of the exported functions should only be used by applications
+        that need to implement custom cache types
+
+        * src/truetype/ttgload.c: fixed a nasty bug that prevent composites
+        from loading correctly. Believe it or not, this was due to an invalid
+        macro definition !!
+
         * src/sfnt/sfobjs.c (SFNT_Load_Face): make the "post" and "name"
         tables optional to load PCL fonts properly
 
diff --git a/include/freetype/cache/ftccache.h b/include/freetype/cache/ftccache.h
index 81d0366..94b6d7a 100644
--- a/include/freetype/cache/ftccache.h
+++ b/include/freetype/cache/ftccache.h
@@ -54,6 +54,13 @@ FT_BEGIN_HEADER
 #define  FTC_NODE(x)    ((FTC_Node)(x))
 #define  FTC_NODE_P(x)  ((FTC_Node*)(x))
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* These functions are exported so that they can be called from          */
+  /* user-provided cache classes; otherwise, they are really part of the   */
+  /* cache sub-system internals.                                           */
+  /*                                                                       */
+
   /* can be used as a FTC_Node_DoneFunc */
   FT_EXPORT( void )
   ftc_node_done( FTC_Node   node,
@@ -113,6 +120,13 @@ FT_BEGIN_HEADER
 #define  FTC_FAMILY_P(x)  ((FTC_Family*)(x))
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* These functions are exported so that they can be called from          */
+  /* user-provided cache classes; otherwise, they are really part of the   */
+  /* cache sub-system internals.                                           */
+  /*                                                                       */
+
  /* must be called by any FTC_Node_InitFunc routine */
   FT_EXPORT(FT_Error)
   ftc_family_init( FTC_Family  family,
@@ -219,6 +233,13 @@ FT_BEGIN_HEADER
 
   /* */
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* These functions are exported so that they can be called from          */
+  /* user-provided cache classes; otherwise, they are really part of the   */
+  /* cache sub-system internals.                                           */
+  /*                                                                       */
+
   /* can be used directly as FTC_Cache_DoneFunc(), or called by custom */
   /* cache finalizers                                                  */
   FT_EXPORT( void )
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index d16d575..3682304 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -375,7 +375,7 @@ FT_BEGIN_HEADER
   /* By undefining this, you will only compile the code necessary to load  */
   /* TrueType glyphs without hinting.                                      */
   /*                                                                       */
-#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 
 
   /*************************************************************************/
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 8b586e2..33caaed 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -145,10 +145,10 @@
 
 
 #define cur_to_org( n, zone ) \
-          MEM_Copy( (zone)->org, (zone)->cur, n * sizeof ( FT_Vector ) )
+          MEM_Copy( (zone)->org, (zone)->cur, (n) * sizeof ( FT_Vector ) )
 
 #define org_to_cur( n, zone ) \
-          MEM_Copy( (zone)->cur, (zone)->org, n * sizeof ( FT_Vector ) )
+          MEM_Copy( (zone)->cur, (zone)->org, (n) * sizeof ( FT_Vector ) )
 
 
   /*************************************************************************/