Commit 180185109b0ffedb5ba50a9f2ac9817f0d2c3694

Werner Lemberg 2016-12-29T21:30:06

[truetype] Tracing fixes. * src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct information. (TT_Set_Var_Design): Fix typo. (TT_Get_Var_Design): Fix typos.

diff --git a/ChangeLog b/ChangeLog
index 97d3f4a..68940a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2016-12-29  Werner Lemberg  <wl@gnu.org>
 
+	[truetype] Tracing fixes.
+
+	* src/truetype/ttgxvar.c (tt_hadvance_adjust): Emit correct
+	information.
+	(TT_Set_Var_Design): Fix typo.
+	(TT_Get_Var_Design): Fix typos.
+
+2016-12-29  Werner Lemberg  <wl@gnu.org>
+
 	*/*: Use `0.5f' for tracing 16.16 numbers.
 
 2016-12-29  Werner Lemberg  <wl@gnu.org>
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 1dae545..ad662a4 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -880,8 +880,6 @@
 
       } /* per-axis loop */
 
-      FT_TRACE4(( ", %f ", scalar / 65536.0 ));
-
       /* get the scaled delta for this region */
       delta       = FT_intToFixed( deltaSet[master] );
       scaledDelta = FT_MulFix( scalar, delta );
@@ -891,9 +889,11 @@
 
     } /* per-region loop */
 
-    FT_TRACE4(( "]\n" ));
-
     /* apply the accumulated adjustment to derive the interpolated value */
+    FT_TRACE5(( "horizontal width %d adjusted by %d units (HVAR)\n",
+                *avalue,
+                FT_fixedToInt( netAdjustment ) ));
+
     *avalue += FT_fixedToInt( netAdjustment );
 
   Exit:
@@ -1819,7 +1819,7 @@
       if ( coord > a->maximum || coord < a->minimum )
       {
         FT_TRACE1((
-          "TT_Set_Var_Design: normalized design coordinate %.5f\n"
+          "TT_Set_Var_Design: design coordinate %.5f\n"
           "                   is out of range [%.5f;%.5f]; clamping\n",
           coord / 65536.0,
           a->minimum / 65536.0,
@@ -1931,7 +1931,7 @@
     nc = num_coords;
     if ( num_coords > blend->num_axis )
     {
-      FT_TRACE2(( "TT_Get_MM_Blend: only using first %d of %d coordinates\n",
+      FT_TRACE2(( "TT_Get_Var_Design: only using first %d of %d coordinates\n",
                   blend->num_axis, num_coords ));
       nc = blend->num_axis;
     }
@@ -1950,7 +1950,7 @@
       GX_AVarSegment  av = blend->avar_segment;
 
 
-      FT_TRACE5(( "normalized design coordinates"
+      FT_TRACE5(( "design coordinates"
                   " after removing `avar' distortion:\n" ));
 
       for ( i = 0; i < nc; i++, av++ )