ref: 01152db10adecd1a0cf6f583950c1e17fc5ccdb7
parent: b9ee7370f60304da99ba3424edbfd36502e0d391
author: David Turner <[email protected]>
date: Sat May 21 06:42:32 EDT 2005
* src/base/ftsynth.c (FT_GlyphSlot_Embolden): fixing a bug that produced unpleasant artefacts when trying to embolden very sharp corners.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-21 David Turner <[email protected]>
+
+ * 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 <[email protected]>
* docs/CHANGES: Updated.
--- 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;