forked from minhngoc25a/freetype2
Fix Savannah bug #36091.
* src/autofit/aflatin.c (af_latin_metrics_init_blues), src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Change the constraint for testing round vs. flat segment: Accept either a small distance or a small angle.
This commit is contained in:
parent
e8da532d2a
commit
5210306145
|
@ -1,3 +1,12 @@
|
||||||
|
2012-07-04 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Fix Savannah bug #36091.
|
||||||
|
|
||||||
|
* src/autofit/aflatin.c (af_latin_metrics_init_blues),
|
||||||
|
src/autofit/aflatin2.c (af_latin2_metrics_init_blues): Change the
|
||||||
|
constraint for testing round vs. flat segment: Accept either a
|
||||||
|
small distance or a small angle.
|
||||||
|
|
||||||
2012-07-04 Werner Lemberg <wl@gnu.org>
|
2012-07-04 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[autofit] Beautify blue zone tracing.
|
[autofit] Beautify blue zone tracing.
|
||||||
|
|
|
@ -301,6 +301,7 @@
|
||||||
/* lies, then inspect its previous and next points */
|
/* lies, then inspect its previous and next points */
|
||||||
if ( best_point >= 0 )
|
if ( best_point >= 0 )
|
||||||
{
|
{
|
||||||
|
FT_Pos best_x = points[best_point].x;
|
||||||
FT_Int prev, next;
|
FT_Int prev, next;
|
||||||
FT_Pos dist;
|
FT_Pos dist;
|
||||||
|
|
||||||
|
@ -317,8 +318,11 @@
|
||||||
else
|
else
|
||||||
prev = best_last;
|
prev = best_last;
|
||||||
|
|
||||||
dist = points[prev].y - best_y;
|
dist = FT_ABS( points[prev].y - best_y );
|
||||||
if ( dist < -5 || dist > 5 )
|
/* accept a small distance or a small angle (both values are */
|
||||||
|
/* heuristic; value 20 corresponds to approx. 2.9 degrees) */
|
||||||
|
if ( dist > 5 )
|
||||||
|
if ( FT_ABS( points[prev].x - best_x ) <= 20 * dist )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
} while ( prev != best_point );
|
} while ( prev != best_point );
|
||||||
|
@ -330,8 +334,9 @@
|
||||||
else
|
else
|
||||||
next = best_first;
|
next = best_first;
|
||||||
|
|
||||||
dist = points[next].y - best_y;
|
dist = FT_ABS( points[next].y - best_y );
|
||||||
if ( dist < -5 || dist > 5 )
|
if ( dist > 5 )
|
||||||
|
if ( FT_ABS( points[next].x - best_x ) <= 20 * dist )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
} while ( next != best_point );
|
} while ( next != best_point );
|
||||||
|
|
|
@ -290,6 +290,7 @@
|
||||||
/* segment; we first need to find in which contour the extremum */
|
/* segment; we first need to find in which contour the extremum */
|
||||||
/* lies, then inspect its previous and next points */
|
/* lies, then inspect its previous and next points */
|
||||||
{
|
{
|
||||||
|
FT_Pos best_x = points[best_point].x;
|
||||||
FT_Int start, end, prev, next;
|
FT_Int start, end, prev, next;
|
||||||
FT_Pos dist;
|
FT_Pos dist;
|
||||||
|
|
||||||
|
@ -304,8 +305,11 @@
|
||||||
if ( prev < best_first )
|
if ( prev < best_first )
|
||||||
prev = best_last;
|
prev = best_last;
|
||||||
|
|
||||||
dist = points[prev].y - best_y;
|
dist = FT_ABS( points[prev].y - best_y );
|
||||||
if ( dist < -5 || dist > 5 )
|
/* accept a small distance or a small angle (both values are */
|
||||||
|
/* heuristic; value 20 corresponds to approx. 2.9 degrees) */
|
||||||
|
if ( dist > 5 )
|
||||||
|
if ( FT_ABS( points[prev].x - best_x ) <= 20 * dist )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
start = prev;
|
start = prev;
|
||||||
|
@ -318,8 +322,9 @@
|
||||||
if ( next > best_last )
|
if ( next > best_last )
|
||||||
next = best_first;
|
next = best_first;
|
||||||
|
|
||||||
dist = points[next].y - best_y;
|
dist = FT_ABS( points[next].y - best_y );
|
||||||
if ( dist < -5 || dist > 5 )
|
if ( dist > 5 )
|
||||||
|
if ( FT_ABS( points[next].x - best_x ) <= 20 * dist )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
end = next;
|
end = next;
|
||||||
|
|
Loading…
Reference in New Issue