* src/base/ftsynth.c (FT_GlyphSlot_Embolden): fixing a bug that produced unpleasant artefacts when trying to embolden very sharp corners.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
diff --git a/ChangeLog b/ChangeLog
index 5d491c1..9f3fb46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-21 David Turner <david@freetype.org>
+
+ * 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 <wl@gnu.org>
* docs/CHANGES: Updated.
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index e030b35..5969af9 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;