From b337fa25cf1ae602a9ba8ac11d2896cc004caa17 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sat, 21 Dec 2013 19:33:15 +0100 Subject: [PATCH] Fix Savannah bug #40975 (sort of). * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType behave the same as the Windows TrueType engine for the invalid case. --- ChangeLog | 7 +++++++ src/truetype/ttinterp.c | 16 +++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7937534ab..4a1f1ecae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-12-21 Werner Lemberg + + Fix Savannah bug #40975 (sort of). + + * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType + behave the same as the Windows TrueType engine for the invalid case. + 2013-12-21 Werner Lemberg [autofit] Make PIC mode work actually. diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index 3f110c28c..4c384ec82 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -7169,7 +7169,7 @@ org_dist = CUR_fast_dualproj( &vec ); } - cur_dist = CUR_Func_project ( &CUR.zp2.cur[point], cur_base ); + cur_dist = CUR_Func_project( &CUR.zp2.cur[point], cur_base ); if ( org_dist ) { @@ -7180,14 +7180,20 @@ /* This is the same as what MS does for the invalid case: */ /* */ /* delta = (Original_Pt - Original_RP1) - */ - /* (Current_Pt - Current_RP1) */ + /* (Current_Pt - Current_RP1) ; */ /* */ /* In FreeType speak: */ /* */ - /* new_dist = cur_dist - */ - /* org_dist - cur_dist; */ + /* delta = org_dist - cur_dist . */ + /* */ + /* We move `point' by `new_dist - cur_dist' after leaving */ + /* this block, thus we have */ + /* */ + /* new_dist - cur_dist = delta , */ + /* new_dist - cur_dist = org_dist - cur_dist , */ + /* new_dist = org_dist . */ - new_dist = -org_dist; + new_dist = org_dist; } } else