Commit a2fa657a03f17ef9cd79b4ad529f08cfe676aa1c

Werner Lemberg 2015-04-01T15:55:41

[autofit] Call dumper functions for tracing. * src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code. * src/autofit/afhints.c (af_glyph_hints_dump_points): Minor improvement. * src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.

diff --git a/ChangeLog b/ChangeLog
index 6693943..ff20967 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2015-04-01  Werner Lemberg  <wl@gnu.org>
 
+	[autofit] Call dumper functions for tracing.
+
+	* src/autofit/afcjk.c (af_cjk_hints_apply): Remove dead code.
+	* src/autofit/afhints.c (af_glyph_hints_dump_points): Minor
+	improvement.
+	* src/autofit/afmodule.c (af_autofitter_load_glyph): Implement it.
+
+2015-04-01  Werner Lemberg  <wl@gnu.org>
+
 	[autofit] Make debugging stuff work again.
 
 	The interface to ftgrid was broken in the series of commits starting
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index 3ce6b41..ffeebea 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -2239,12 +2239,6 @@
       }
     }
 
-#if 0
-    af_glyph_hints_dump_points( hints );
-    af_glyph_hints_dump_segments( hints );
-    af_glyph_hints_dump_edges( hints );
-#endif
-
     af_glyph_hints_save( hints, outline );
 
   Exit:
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index ab32dd0..442cf6d 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -231,9 +231,13 @@
     AF_Point  point;
 
 
-    AF_DUMP(( "Table of points:\n"
-              "  [ index |  xorg |  yorg | xscale | yscale"
-              " |  xfit |  yfit |  flags ]\n" ));
+    AF_DUMP(( "Table of points:\n" ));
+
+    if ( hints->num_points )
+      AF_DUMP(( "  [ index |  xorg |  yorg | xscale | yscale"
+                " |  xfit |  yfit |  flags ]\n" ));
+    else
+      AF_DUMP(( "  (none)\n" ));
 
     for ( point = points; point < limit; point++ )
       AF_DUMP(( "  [ %5d | %5d | %5d | %6.2f | %6.2f"
diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c
index 4968e01..5b82f66 100644
--- a/src/autofit/afmodule.c
+++ b/src/autofit/afmodule.c
@@ -302,6 +302,10 @@
     error = af_loader_load_glyph( loader, module, slot->face,
                                   glyph_index, load_flags );
 
+    af_glyph_hints_dump_points( hints, 0 );
+    af_glyph_hints_dump_segments( hints, 0 );
+    af_glyph_hints_dump_edges( hints, 0 );
+
     af_loader_done( loader );
 
     return error;