[cff] Optimize by using `FT_MulDiv'.

Suggested by Alexei.

* src/cff/cf2font.c (cf2_computeDarkening): Do it.
2.6.5
Dave Arnold 11 years ago committed by Werner Lemberg
parent 85ee27ae93
commit 89a94d4212
  1. 7
      ChangeLog
  2. 6
      src/cff/cf2font.c

@ -1,3 +1,10 @@
2014-02-12 Dave Arnold <darnold@adobe.com>
[cff] Optimize by using `FT_MulDiv'.
Suggested by Alexei.
* src/cff/cf2font.c (cf2_computeDarkening): Do it.
2014-02-12 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #41465.

@ -167,7 +167,7 @@
if ( !xdelta )
goto Try_x3;
*darkenAmount = FT_MulFix( x, FT_DivFix( ydelta, xdelta ) ) +
*darkenAmount = FT_MulDiv( x, ydelta, xdelta ) +
FT_DivFix( cf2_intToFixed( y1 ), ppem );
}
@ -184,7 +184,7 @@
if ( !xdelta )
goto Try_x4;
*darkenAmount = FT_MulFix( x, FT_DivFix( ydelta, xdelta ) ) +
*darkenAmount = FT_MulDiv( x, ydelta, xdelta ) +
FT_DivFix( cf2_intToFixed( y2 ), ppem );
}
}
@ -202,7 +202,7 @@
if ( !xdelta )
goto Use_y4;
*darkenAmount = FT_MulFix( x, FT_DivFix( ydelta, xdelta ) ) +
*darkenAmount = FT_MulDiv( x, ydelta, xdelta ) +
FT_DivFix( cf2_intToFixed( y3 ), ppem );
}
}

Loading…
Cancel
Save