[truetype] A better fix for Savannah bug #38211. * src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).
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 7bd42e5..9e7b6bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-02-05 Werner Lemberg <wl@gnu.org>
+
+ [truetype] A better fix for Savannah bug #38211.
+
+ * src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to
+ MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).
+
2013-02-01 Alexei Podtelezhnikov <apodtele@gmail.com>
[pcf] Streamline parsing of PCF encoding table.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 4e4a5bf..39b804c 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -6979,11 +6979,17 @@
new_dist = FT_MulDiv( org_dist, cur_range, old_range );
else
{
- /* use the middle position */
- new_dist = cur_dist -
- CUR_fast_dualproj( &CUR.zp2.cur[point] ) +
- ( CUR_fast_dualproj( &CUR.zp1.cur[CUR.GS.rp1] ) +
- CUR_fast_dualproj( &CUR.zp1.cur[CUR.GS.rp2] ) ) / 2;
+ /* This is the same as what MS does for the invalid case: */
+ /* */
+ /* delta = (Original_Pt - Original_RP1) - */
+ /* (Current_Pt - Current_RP1) */
+ /* */
+ /* In FreeType speak: */
+ /* */
+ /* new_dist = cur_dist - */
+ /* org_dist - cur_dist; */
+
+ new_dist = -org_dist;
}
}
else