freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] [bug #37017] Freetype 2.4.8 renders the "Sabrina-AT" font


From: Werner LEMBERG
Subject: Re: [ft-devel] [bug #37017] Freetype 2.4.8 renders the "Sabrina-AT" font incorrectly.
Date: Sun, 12 Aug 2012 08:45:37 +0200 (CEST)

Graham, David,


some time ago we had a discussion about the usefulness of a patch from
Alexei:

  http://lists.nongnu.org/archive/html/freetype-devel/2010-11/msg00010.html

However, right now the usefulness is evident, since applying the patch
fixes the quite serious issue #37017. :-)

  https://savannah.nongnu.org/bugs/index.php?37017

For reference, I'm attaching his patch below.  In case you have Bézier
harness tests, please run them!

Alexei, please extend the comment so that normal mortals like me can
better understand the mathematical logic behind your change, then
apply it.


    Werner


======================================================================


diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index a7a18f2..bb263fb 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1082,10 +1082,8 @@ typedef ptrdiff_t  FT_PtrDist;
           goto Split;

         /* If P1 or P2 is outside P0-P3, split the curve. */
-        if ( dy * dy1 + dx * dx1 < 0                                     ||
-             dy * dy2 + dx * dx2 < 0                                     ||
-             dy * (arc[3].y - arc[1].y) + dx * (arc[3].x - arc[1].x) < 0 ||
-             dy * (arc[3].y - arc[2].y) + dx * (arc[3].x - arc[2].x) < 0 )
+        if ( dx1 * ( dx1 - dx ) + dy1 * ( dy1 - dy ) > 0 ||
+             dx2 * ( dx2 - dx ) + dy2 * ( dy2 - dy ) > 0 )
           goto Split;

         /* No reason to split. */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]