Fix Savannah bug #37017.

* src/smooth/ftgrays.c (gray_render_cubic): Use a different set of
checks when detecting super curvy splines to be split.
This commit is contained in:
Alexei Podtelezhnikov 2012-08-12 11:14:46 -04:00
parent 5b995a8dd8
commit 9ea55c7c33
2 changed files with 18 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2012-08-12 Alexei Podtelezhnikov <apodtele@gmail.com>
Fix Savannah bug #37017.
* src/smooth/ftgrays.c (gray_render_cubic): Use a different set of
checks when detecting super curvy splines to be split.
2012-08-05 Werner Lemberg <wl@gnu.org>
[autofit] Improve recognition of flat segments.
@ -44,6 +51,12 @@
* src/type1/t1load.c (parse_encoding): Check cursor position after
call to T1_Skip_PS_Token.
2012-07-12 Alexei Podtelezhnikov <apodtele@gmail.com>
Revert the last commit 45337b07.
* src/base/ftstroke.c (FT_Stroker_New): Revert the previous chenge.
2012-07-11 Alexei Podtelezhnikov <apodtele@gmail.com>
[ftstroke] Fix uninitialized return value.

View File

@ -1091,11 +1091,11 @@ typedef ptrdiff_t FT_PtrDist;
if ( s > s_limit )
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 )
/* Split super curvy segments where the off points are so far
from the chord that the angles P0-P1-P3 or P0-P2-P3 become
acute as detected by appropriate dot products. */
if ( dx1 * ( dx1 - dx ) + dy1 * ( dy1 - dy ) > 0 ||
dx2 * ( dx2 - dx ) + dy2 * ( dy2 - dy ) > 0 )
goto Split;
/* No reason to split. */