From 01152db10adecd1a0cf6f583950c1e17fc5ccdb7 Mon Sep 17 00:00:00 2001 From: David Turner Date: Sat, 21 May 2005 10:42:32 +0000 Subject: [PATCH] * src/base/ftsynth.c (FT_GlyphSlot_Embolden): fixing a bug that produced unpleasant artefacts when trying to embolden very sharp corners. --- ChangeLog | 5 +++++ src/base/ftsynth.c | 15 +++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d491c1e0..9f3fb46cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-21 David Turner + + * src/base/ftsynth.c (FT_GlyphSlot_Embolden): fixing a bug that produced + unpleasant artefacts when trying to embolden very sharp corners. + 2005-05-20 Werner Lemberg * docs/CHANGES: Updated. diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c index e030b3502..5969af99b 100644 --- a/src/base/ftsynth.c +++ b/src/base/ftsynth.c @@ -134,17 +134,16 @@ angle_diff = FT_Angle_Diff( angle_in, angle_out ); scale = FT_Cos( angle_diff/2 ); - if ( scale < 0x400L && scale > -0x400L ) + if ( scale < 0x4000L && scale > -0x4000L ) { - if ( scale >= 0 ) - scale = 0x400L; - else - scale = -0x400L; + in.x = in.y = 0; } + else + { + d = FT_DivFix( distance, scale ); - d = FT_DivFix( distance, scale ); - - FT_Vector_From_Polar( &in, d, angle_in + angle_diff/2 - rotate ); + FT_Vector_From_Polar( &in, d, angle_in + angle_diff/2 - rotate ); + } outline->points[n].x = v_cur.x + distance + in.x; outline->points[n].y = v_cur.y + distance + in.y;