[truetype] Tweak the previous commit. * src/truetype/ttinterp.c (Current_Ratio): Put unit vector components as the second TT_MulFix14 arguments. This is required on 16-bit systems.
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 43 44 45 46
diff --git a/ChangeLog b/ChangeLog
index 1373f64..bc7cead 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [truetype] Tweak the previous commit.
+
+ * src/truetype/ttinterp.c (Current_Ratio): Put unit vector
+ components as the second TT_MulFix14 arguments. This is required
+ on 16-bit systems.
+
+2012-12-06 Alexei Podtelezhnikov <apodtele@gmail.com>
+
[truetype] Microoptimizations in bytecode interpreter.
* src/truetype/ttinterp.c (TT_DivFix14): New macro.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index ffdf74d..ca27f36 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -233,7 +233,7 @@
/*************************************************************************/
/* */
- /* This macro computes (a*2^14)/b and compliments TT_MulFix14. */
+ /* This macro computes (a*2^14)/b and complements TT_MulFix14. */
/* */
#define TT_DivFix14( a, b ) \
FT_DivFix( a, (b) << 2 )
@@ -1671,10 +1671,10 @@
FT_F26Dot6 x, y;
- x = TT_MulFix14( CUR.GS.projVector.x,
- CUR.tt_metrics.x_ratio );
- y = TT_MulFix14( CUR.GS.projVector.y,
- CUR.tt_metrics.y_ratio );
+ x = TT_MulFix14( CUR.tt_metrics.x_ratio,
+ CUR.GS.projVector.x );
+ y = TT_MulFix14( CUR.tt_metrics.y_ratio,
+ CUR.GS.projVector.y );
CUR.tt_metrics.ratio = TT_VecLen( x, y );
}
}