Commit 70f4cff19d0b555cf4a217de6cd114af750dddcf

Werner Lemberg 2008-09-20T16:12:05

* src/smooth/ftgrays.c (gray_find_cell): Fix threshold. The values passed to this function are already `normalized'. Problem reported by Stephan T. Lavavej <stl@nuwen.net>. * docs/CHANGES: Document it.

diff --git a/ChangeLog b/ChangeLog
index 8e1d852..291b329 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-09-20  Werner Lemberg  <wl@gnu.org>
 
+	* src/smooth/ftgrays.c (gray_find_cell): Fix threshold.  The values
+	passed to this function are already `normalized'.  Problem reported
+	by Stephan T. Lavavej  <stl@nuwen.net>.
+
+	* docs/CHANGES: Document it.
+
+2008-09-20  Werner Lemberg  <wl@gnu.org>
+
 	* src/base/ftoutln.c: Include FT_INTERNAL_DEBUG_H.
 	(FT_Outline_Decompose): Decorate with tracing messages.
 
@@ -16,7 +24,7 @@
 	(gray_hline) [FT_DEBUG_LEVEL_TRACE]: Fix condition.
 	Use FT_TRACE7.
 	(gray_dump_cells): Make it `static void'.
-	(graay_convert_glyph): Use FT_TRACE7.
+	(gray_convert_glyph): Use FT_TRACE7.
 
 	(FT_Outline_Decompose) [_STANDALONE_]: Synchronize with version in
 	ftoutln.c.
diff --git a/docs/CHANGES b/docs/CHANGES
index 530b951..2b2b016 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -4,6 +4,12 @@ CHANGES BETWEEN 2.3.8 and 2.3.7
 
     - CID-keyed fonts in an SFNT wrapper were not handled correctly.
 
+    - The smooth renderer produced truncated images (on the right) for
+      outline parts with negative horizontal values.  Most fonts don't
+      contain outlines left  to the y coordinate axis, but  the effect
+      was very noticeable for outlines processed with FT_Glyph_Stroke,
+      using thick strokes.
+
 
   II. IMPORTANT CHANGES
 
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 4345fbd..054cf6c 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -431,8 +431,8 @@
     int     x = ras.ex;
 
 
-    if ( x > ras.max_ex )
-      x = ras.max_ex;
+    if ( x > ras.count_ex )
+      x = ras.count_ex;
 
     pcell = &ras.ycells[ras.ey];
     for (;;)