*slight* formatting only. Congratulations, David! :-)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index 873dc2d..7e0ad47 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -69,7 +69,7 @@
/* this function is used by ah_get_orientation (see below) to test */
- /* the fill direction of a given bbox extrema.. */
+ /* the fill direction of a given bbox extrema */
static
int ah_test_extrema( FT_Outline* outline,
int n )
@@ -80,10 +80,10 @@
/* we need to compute the `previous' and `next' point */
- /* for these extrema. */
- cur = outline->points + n;
- prev = cur - 1;
- next = cur + 1;
+ /* for these extrema */
+ cur = outline->points + n;
+ prev = cur - 1;
+ next = cur + 1;
first = 0;
for ( c = 0; c < outline->n_contours; c++ )
@@ -137,10 +137,10 @@
indices.xMax = -1;
indices.yMax = -1;
- box.xMin = box.yMin = 32767;
+ box.xMin = box.yMin = 32767;
box.xMax = box.yMax = -32768;
- /* is it empty ? */
+ /* is it empty? */
if ( outline->n_contours < 1 )
return 1;
@@ -178,16 +178,19 @@
/* test orientation of the xmin */
n = ah_test_extrema( outline, indices.xMin );
- if (n) goto Exit;
+ if ( n )
+ goto Exit;
n = ah_test_extrema( outline, indices.yMin );
- if (n) goto Exit;
+ if ( n )
+ goto Exit;
n = ah_test_extrema( outline, indices.xMax );
- if (n) goto Exit;
+ if ( n )
+ goto Exit;
n = ah_test_extrema( outline, indices.yMax );
- if (!n)
+ if ( !n )
n = 1;
Exit:
@@ -195,7 +198,6 @@
}
-
/*************************************************************************/
/* */
/* <Function> */
@@ -347,10 +349,11 @@
outline->num_vsegments = 0;
#if 1
- /* we can't rely on the value of FT_Outline.flags to know the */
- /* fill direction used for a glyph, given that some fonts are */
- /* broken (e.g. the Arphic ones..). We thus recompute it each */
- /* time we need to.. */
+
+ /* We can't rely on the value of `FT_Outline.flags' to know the fill */
+ /* direction used for a glyph, given that some fonts are broken (e.g. */
+ /* the Arphic ones). We thus recompute it each time we need to. */
+ /* */
outline->vert_major_dir = ah_dir_up;
outline->horz_major_dir = ah_dir_left;
@@ -359,7 +362,9 @@
outline->vert_major_dir = ah_dir_down;
outline->horz_major_dir = ah_dir_right;
}
+
#else
+
/* Compute the vertical and horizontal major directions; this is */
/* currently done by inspecting the `ft_outline_reverse_fill' flag. */
/* However, some fonts have improper glyphs, and it'd be a good idea */
@@ -372,12 +377,14 @@
outline->vert_major_dir = ah_dir_down;
outline->horz_major_dir = ah_dir_right;
}
-#endif
+
+#endif /* 1 */
+
outline->x_scale = face->size->metrics.x_scale;
outline->y_scale = face->size->metrics.y_scale;
points = outline->points;
- if (outline->num_points == 0)
+ if ( outline->num_points == 0 )
goto Exit;
{