* src/autohint/ahglyph.c (ah_test_extrema): Renamed to... (ah_test_extremum): This.
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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
diff --git a/ChangeLog b/ChangeLog
index d919942..27c1d02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-01 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahglyph.c (ah_test_extrema): Renamed to...
+ (ah_test_extremum): This.
+
2003-04-28 Werner Lemberg <wl@gnu.org>
* builds/unix/configure.ac: Generate `freetype.pc' from
diff --git a/src/autohint/ahglobal.c b/src/autohint/ahglobal.c
index f6fdd90..120c4a2 100644
--- a/src/autohint/ahglobal.c
+++ b/src/autohint/ahglobal.c
@@ -235,8 +235,8 @@
AH_LOG(( "\n" ));
/* we have computed the contents of the `rounds' and `flats' tables, */
- /* now determine the reference and overshoot position of the blue; */
- /* we simply take the median value after a simple short */
+ /* now determine the reference and overshoot position of the blue -- */
+ /* we simply take the median value after a simple sort */
sort_values( num_rounds, rounds );
sort_values( num_flats, flats );
@@ -312,7 +312,7 @@
/* stem height of the "-", but it wasn't too good. Moreover, we now */
/* have a single character that gives us standard width and height. */
{
- FT_UInt glyph_index;
+ FT_UInt glyph_index;
glyph_index = FT_Get_Char_Index( hinter->face, 'o' );
@@ -376,7 +376,7 @@
}
/* Now, compute the edge distance threshold as a fraction of the */
- /* smallest width in the font. Set it in `hinter.glyph' too! */
+ /* smallest width in the font. Set it in `hinter->glyph' too! */
if ( edge_distance_threshold == 32000 )
edge_distance_threshold = 50;
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index b371c55..8a9c331 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -120,8 +120,8 @@
: ( seg->dir == AH_DIR_RIGHT
? "right"
: "none" ) ) ),
- seg->link ? (seg->link-segments) : -1,
- seg->serif ? (seg->serif-segments) : -1,
+ seg->link ? ( seg->link - segments ) : -1,
+ seg->serif ? ( seg->serif - segments ) : -1,
(int)seg->num_linked,
seg->first - points,
seg->last - points );
@@ -135,7 +135,7 @@
#endif /* AH_DEBUG */
- /* compute the direction value of a given vector.. */
+ /* compute the direction value of a given vector */
static AH_Direction
ah_compute_direction( FT_Pos dx,
FT_Pos dy )
@@ -147,6 +147,8 @@
dir = AH_DIR_NONE;
+ /* atan(1/12) == 4.7 degrees */
+
/* test for vertical direction */
if ( ax * 12 < ay )
{
@@ -163,10 +165,10 @@
/* this function is used by ah_get_orientation (see below) to test */
- /* the fill direction of a given bbox extrema */
+ /* the fill direction of given bbox extremum */
static FT_Int
- ah_test_extrema( FT_Outline* outline,
- FT_Int n )
+ ah_test_extremum( FT_Outline* outline,
+ FT_Int n )
{
FT_Vector *prev, *cur, *next;
FT_Pos product;
@@ -175,7 +177,9 @@
/* we need to compute the `previous' and `next' point */
- /* for these extrema */
+ /* for this extremum; we check whether the extremum */
+ /* is start or end of a contour and providing */
+ /* appropriate values if so */
cur = outline->points + n;
prev = cur - 1;
next = cur + 1;
@@ -183,7 +187,7 @@
first = 0;
for ( c = 0; c < outline->n_contours; c++ )
{
- last = outline->contours[c];
+ last = outline->contours[c];
if ( n == first )
prev = outline->points + last;
@@ -218,7 +222,7 @@
/* We do this by computing bounding box points, and computing their */
/* curvature. */
/* */
- /* The function returns either 1 or -1. */
+ /* The function returns either 1 or 2. */
/* */
static FT_Int
ah_get_orientation( FT_Outline* outline )
@@ -272,20 +276,20 @@
}
}
- /* test orientation of the xmin */
- n = ah_test_extrema( outline, indices_xMin );
+ /* test orientation of the extrema */
+ n = ah_test_extremum( outline, indices_xMin );
if ( n )
goto Exit;
- n = ah_test_extrema( outline, indices_yMin );
+ n = ah_test_extremum( outline, indices_yMin );
if ( n )
goto Exit;
- n = ah_test_extrema( outline, indices_xMax );
+ n = ah_test_extremum( outline, indices_xMax );
if ( n )
goto Exit;
- n = ah_test_extrema( outline, indices_yMax );
+ n = ah_test_extremum( outline, indices_yMax );
if ( !n )
n = 1;
@@ -306,14 +310,14 @@
ah_outline_new( FT_Memory memory,
AH_Outline* aoutline )
{
- FT_Error error;
- AH_Outline outline;
+ FT_Error error;
+ AH_Outline outline;
if ( !FT_NEW( outline ) )
{
outline->memory = memory;
- *aoutline = outline;
+ *aoutline = outline;
}
return error;
diff --git a/src/autohint/ahtypes.h b/src/autohint/ahtypes.h
index c5cf27a..d004ed4 100644
--- a/src/autohint/ahtypes.h
+++ b/src/autohint/ahtypes.h
@@ -121,7 +121,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
- /* see agangles.h */
+ /* see ahangles.h */
typedef FT_Int AH_Angle;