Commit 735e5abb7bbad8e74e56228176a7d93b345f071b

Werner Lemberg 2011-05-27T10:22:42

[autofit] Improve tracing of hinting process. * src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message `ADJUST'.

diff --git a/ChangeLog b/ChangeLog
index 893febf..79a3e07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-05-27  Werner Lemberg  <wl@gnu.org>
+
+	[autofit] Improve tracing of hinting process.
+
+	* src/autofit/aflatin.c (af_latin_hint_edges): Add tracing message
+	`ADJUST'.
+
+2011-05-26  Werner Lemberg  <wl@gnu.org>
+
+	[autofit] Fix trace message.
+
+	* src/autofit/aflatin.c (af_latin_hint_edges): Show correct value in
+	tracing message.
+
 2011-05-24  Daniel Zimmermann  <netzimme@googlemail.com>
 
 	Reduce warnings for MS Visual Studio 2010.
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 055e1ef..b939938 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1968,7 +1968,13 @@
                     (AF_Edge_Flags)edge2->flags );
 
         if ( edge2->flags & AF_EDGE_DONE )
+        {
+          FT_TRACE5(( "  ADJUST: edge %d (pos=%.2f) moved to %.2f\n",
+                      edge - edges, edge->pos / 64.0,
+                      ( edge2->pos - cur_len ) / 64.0 ));
+
           edge->pos = edge2->pos - cur_len;
+        }
 
         else if ( cur_len < 96 )
         {
@@ -2149,11 +2155,11 @@
         }
         else if ( !anchor )
         {
+          edge->pos = FT_PIX_ROUND( edge->opos );
+          anchor    = edge;
           FT_TRACE5(( "  SERIF_ANCHOR: edge %d (opos=%.2f)"
                       " snapped to (%.2f)\n",
                       edge-edges, edge->opos / 64.0, edge->pos / 64.0 ));
-          edge->pos = FT_PIX_ROUND( edge->opos );
-          anchor    = edge;
         }
         else
         {