Commit 6abb9232b6e1c6b26ff1423a1f0be84e89fa297c

Werner Lemberg 2010-09-14T09:02:10

Improve tracing messages. * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing message. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add tracing message. * src/truetype/ttgload.c (tt_loader_init): Add tracing message. * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if glyph doesn't fit into a small bitmap container.

diff --git a/ChangeLog b/ChangeLog
index af6d871..4b16516 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-14  Werner Lemberg  <wl@gnu.org>
+
+	Improve tracing messages.
+
+	* src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing
+	message.
+	* src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add
+	tracing message.
+	* src/truetype/ttgload.c (tt_loader_init): Add tracing message.
+	* src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if
+	glyph doesn't fit into a small bitmap container.
+
 2010-09-13  Werner Lemberg  <wl@gnu.org>
 
 	Fix minor issues reported by <muktha.narayan@wipro.com>.
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index 07a4641..83245af 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -160,7 +160,11 @@
            !CHECK_CHAR( slot->bitmap_top  ) ||
            !CHECK_CHAR( xadvance )          ||
            !CHECK_CHAR( yadvance )          )
+      {
+        FT_TRACE2(( "ftc_snode_load:"
+                    " glyph too large for small bitmap cache\n"));
         goto BadGlyph;
+      }
 
       sbit->width     = (FT_Byte)bitmap->width;
       sbit->height    = (FT_Byte)bitmap->rows;
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 1b496c0..3a69b7b 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1910,6 +1910,9 @@
         FT_UInt  i;
 
 
+        FT_TRACE4(( "tt_loader_init: grayscale change,"
+                    " re-executing `prep' table\n" ));
+
         exec->grayscale = grayscale;
 
         for ( i = 0; i < size->cvt_size; i++ )
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 8fde49a..a3eeaa6 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -8166,7 +8166,7 @@
     /* it should not be used for next interpretation. */
     if ( CUR.error )
     {
-      FT_TRACE1(( "  The interpreter got an error = %d\n", CUR.error ));
+      FT_TRACE1(( "  The interpreter returned error 0x%x\n", CUR.error ));
       free_buffer_in_size( exc );
       exc->size->cvt_ready = FALSE;  
       exc->size->bytecode_ready = FALSE;  
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 7475136..c884402 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -4,7 +4,8 @@
 /*                                                                         */
 /*    Objects manager (body).                                              */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,   */
+/*            2010 by                                                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -459,7 +460,11 @@
       error = TT_Goto_CodeRange( exec, tt_coderange_font, 0 );
 
       if ( !error )
+      {
+        FT_TRACE4(( "Executing `fpgm' table.\n" ));
+
         error = face->interpreter( exec );
+      }
     }
     else
       error = TT_Err_Ok;
@@ -521,7 +526,11 @@
       error = TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 );
 
       if ( !error && !size->debug )
+      {
+        FT_TRACE4(( "Executing `prep' table.\n" ));
+
         error = face->interpreter( exec );
+      }
     }
     else
       error = TT_Err_Ok;