From dfa86d65e5b8f4f4c62f37160a2475b705e14c56 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 3 Nov 2018 22:36:52 -0400 Subject: [PATCH] Revert "[truetype] Speed up variation IUP." This reverts commit 1e4496c54c010843c1bac56e5d344115d1a49620. --- ChangeLog | 4 ++++ src/truetype/ttgxvar.c | 21 +++------------------ 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index b98801a2c..822c521c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-11-03 Alexei Podtelezhnikov + + Revert due to specs: [truetype] Speed up variation IUP. + 2018-11-02 Alexei Podtelezhnikov * src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic. diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c index 407dcae83..ea63a0468 100644 --- a/src/truetype/ttgxvar.c +++ b/src/truetype/ttgxvar.c @@ -3514,25 +3514,10 @@ /* If the reference points have the same coordinate but different */ /* delta, inferred delta is zero. Otherwise interpolate. */ - if ( in1 == in2 || out1 == out2 ) + if ( in1 != in2 || out1 == out2 ) { - for ( p = p1; p <= p2; p++ ) - { - out = in_points[p].x; - - if ( out <= in1 ) - out += d1; - else if ( out >= in2 ) - out += d2; - else - out = out1; - - out_points[p].x = out; - } - } - else - { - FT_Fixed scale = FT_DivFix( out2 - out1, in2 - in1 ); + FT_Fixed scale = in1 != in2 ? FT_DivFix( out2 - out1, in2 - in1 ) + : 0; for ( p = p1; p <= p2; p++ )