Commit dd305f31f0b483c8e3a74a5a92c0aa2688c5ac7b

Werner Lemberg 2015-12-09T21:00:33

[autofit] Thinko. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count empty blue zones (bug introduced 2015-12-06).

diff --git a/ChangeLog b/ChangeLog
index 73239bd..e1e3462 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2015-12-09  Werner Lemberg  <wl@gnu.org>
 
+	[autofit] Thinko.
+
+	* src/autofit/aflatin.c (af_latin_metrics_init_blues): Don't count
+	empty blue zones (bug introduced 2015-12-06).
+
+2015-12-09  Werner Lemberg  <wl@gnu.org>
+
 	[autofit] Introduce subscript top blue zones.
 
 	This feature is mainly for Khmer: The idea is to avoid a clash
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index aeaffb8..b85d6cd 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -822,10 +822,14 @@
 
         } /* end for loop */
 
-        if ( best_round )
-          rounds[num_rounds++] = best_y_extremum;
-        else
-          flats[num_flats++]   = best_y_extremum;
+        if ( !( best_y_extremum == FT_INT_MIN ||
+                best_y_extremum == FT_INT_MAX ) )
+        {
+          if ( best_round )
+            rounds[num_rounds++] = best_y_extremum;
+          else
+            flats[num_flats++]   = best_y_extremum;
+        }
 
       } /* end while loop */