[autofit] Variable renamings. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Replace `glyph' with `outline'. s/best_first/best_contour_first/. s/best_last/best_contour_last/.
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
diff --git a/ChangeLog b/ChangeLog
index 6bbdf0e..1ee6c86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-08-05 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Variable renamings.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Replace
+ `glyph' with `outline'.
+ s/best_first/best_contour_first/.
+ s/best_last/best_contour_last/.
+
2012-07-31 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #37000.
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 91c65a0..d7ea4a6 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -198,7 +198,7 @@
AF_LatinBlue blue;
FT_Error error;
AF_LatinAxis axis = &metrics->axis[AF_DIMENSION_VERT];
- FT_GlyphSlot glyph = face->glyph;
+ FT_Outline outline;
/* we compute the blues simply by loading each character from the */
@@ -225,7 +225,7 @@
{
FT_UInt glyph_index;
FT_Pos best_y; /* same as points.y */
- FT_Int best_point, best_first, best_last;
+ FT_Int best_point, best_contour_first, best_contour_last;
FT_Vector* points;
FT_Bool round = 0;
@@ -235,16 +235,17 @@
if ( glyph_index == 0 )
continue;
- error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
- if ( error || glyph->outline.n_points <= 0 )
+ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
+ outline = face->glyph->outline;
+ if ( error || outline.n_points <= 0 )
continue;
/* now compute min or max point indices and coordinates */
- points = glyph->outline.points;
- best_point = -1;
- best_y = 0; /* make compiler happy */
- best_first = 0; /* ditto */
- best_last = 0; /* ditto */
+ points = outline.points;
+ best_point = -1;
+ best_y = 0; /* make compiler happy */
+ best_contour_first = 0; /* ditto */
+ best_contour_last = 0; /* ditto */
{
FT_Int nn;
@@ -252,15 +253,13 @@
FT_Int last = -1;
- for ( nn = 0;
- nn < glyph->outline.n_contours;
- first = last + 1, nn++ )
+ for ( nn = 0; nn < outline.n_contours; first = last + 1, nn++ )
{
FT_Int old_best_point = best_point;
FT_Int pp;
- last = glyph->outline.contours[nn];
+ last = outline.contours[nn];
/* Avoid single-point contours since they are never rasterized. */
/* In some fonts, they correspond to mark attachment points */
@@ -289,8 +288,8 @@
if ( best_point != old_best_point )
{
- best_first = first;
- best_last = last;
+ best_contour_first = first;
+ best_contour_last = last;
}
}
FT_TRACE5(( " %c %ld", *p, best_y ));
@@ -313,10 +312,10 @@
do
{
- if ( prev > best_first )
+ if ( prev > best_contour_first )
prev--;
else
- prev = best_last;
+ prev = best_contour_last;
dist = FT_ABS( points[prev].y - best_y );
/* accept a small distance or a small angle (both values are */
@@ -329,10 +328,10 @@
do
{
- if ( next < best_last )
+ if ( next < best_contour_last )
next++;
else
- next = best_first;
+ next = best_contour_first;
dist = FT_ABS( points[next].y - best_y );
if ( dist > 5 )
@@ -343,8 +342,8 @@
/* now set the `round' flag depending on the segment's kind */
round = FT_BOOL(
- FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_CURVE_TAG_ON ||
- FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_CURVE_TAG_ON );
+ FT_CURVE_TAG( outline.tags[prev] ) != FT_CURVE_TAG_ON ||
+ FT_CURVE_TAG( outline.tags[next] ) != FT_CURVE_TAG_ON );
FT_TRACE5(( " (%s)\n", round ? "round" : "flat" ));
}