shithub: freetype+ttf2subf

Download patch

ref: 948a8fb674c99ff41ae108b986721a4fd15c6a0e
parent: 9f5ed8118cf115a631809ce9e4745b5018e96c5e
author: Werner Lemberg <[email protected]>
date: Mon Apr 4 09:02:08 EDT 2011

Fix formatting of autofit debug dumps.

* src/autofit/afhints.c (af_glyph_hints_dump_points,
af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust
column widths.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-04-04  Werner Lemberg  <[email protected]>
+
+	Fix formatting of autofit debug dumps.
+
+	* src/autofit/afhints.c (af_glyph_hints_dump_points,
+	af_glyph_hints_dump_segments, af_glyph_hints_dump_edges): Adjust
+	column widths.
+
 2011-03-30  Werner Lemberg  <[email protected]>
 
 	* src/autofit/aftypes.h (AF_OutlineRec): Removed, unused.
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -176,13 +176,13 @@
 
 
     printf( "Table of points:\n" );
-    printf(   "  [ index |  xorg |  yorg |  xscale |  yscale"
-              " |  xfit  |  yfit  |  flags ]\n" );
+    printf(   "  [ index |  xorg |  yorg | xscale | yscale"
+              " |  xfit |  yfit |  flags ]\n" );
 
     for ( point = points; point < limit; point++ )
     {
-      printf( "  [ %5d | %5d | %5d | %-5.2f | %-5.2f"
-              " | %-5.2f | %-5.2f | %c%c%c%c%c%c ]\n",
+      printf( "  [ %5d | %5d | %5d | %6.2f | %6.2f"
+              " | %5.2f | %5.2f | %c%c%c%c%c%c ]\n",
               point - points,
               point->fx,
               point->fy,
@@ -254,11 +254,11 @@
       printf ( "Table of %s segments:\n",
                dimension == AF_DIMENSION_HORZ ? "vertical" : "horizontal" );
       printf ( "  [ index |  pos  |  dir  | link | serif |"
-               " height  | extra | flags    ]\n" );
+               " height | extra |    flags    ]\n" );
 
       for ( seg = segments; seg < limit; seg++ )
       {
-        printf ( "  [ %5d | %5.2g | %5s | %4d | %5d | %5d | %5d | %s ]\n",
+        printf ( "  [ %5d | %5.2g | %5s | %4d | %5d | %6d | %5d | %11s ]\n",
                  seg - segments,
                  dimension == AF_DIMENSION_HORZ ? (int)seg->first->ox / 64.0
                                                 : (int)seg->first->oy / 64.0,
@@ -303,12 +303,12 @@
       printf ( "Table of %s edges:\n",
                dimension == AF_DIMENSION_HORZ ? "vertical" : "horizontal" );
       printf ( "  [ index |  pos  |  dir  | link |"
-               " serif | blue | opos  |  pos  | flags   ]\n" );
+               " serif | blue | opos  |  pos  |    flags    ]\n" );
 
       for ( edge = edges; edge < limit; edge++ )
       {
         printf ( "  [ %5d | %5.2g | %5s | %4d |"
-                 " %5d |   %c  | %5.2f | %5.2f | %s ]\n",
+                 " %5d |   %c  | %5.2f | %5.2f | %11s ]\n",
                  edge - edges,
                  (int)edge->opos / 64.0,
                  af_dir_str( (AF_Direction)edge->dir ),
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1571,7 +1571,7 @@
            ( dist < 3 * 64 )              )
         goto Done_Width;
 
-      else if ( ( base_flags & AF_EDGE_ROUND ) )
+      else if ( base_flags & AF_EDGE_ROUND )
       {
         if ( dist < 80 )
           dist = 64;