diff options
author | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2009-07-03 18:01:33 +0900 |
---|---|---|
committer | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2009-07-03 18:01:33 +0900 |
commit | 19714ca65b913d6bdf064a2a92ce36b48adb14b9 (patch) | |
tree | 158dbe33821b8c1556b7e81f21eb2c610d70d2d3 | |
parent | 6b7c0a901c3ac32ff51d7881bb8342f89765dbdf (diff) |
truetype: Cast the scaling params to 32-bit for LP64 system.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/truetype/ttgload.c | 16 |
2 files changed, 16 insertions, 8 deletions
@@ -1,5 +1,13 @@ 2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> + truetype: Cast the scaling params to 32-bit for LP64 system. + + * src/truetype/ttgload.c (TT_Process_Composite_Component): + Insert casts from long (return value of FT_MulFix()) to + FT_Int32 (the argument to FT_SqrtFixed()). + +2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> + sfnt: Cast a character code to FT_UInt32 for LP64 system. * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary, diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 9251cab3..2a0e5d3f 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -936,15 +936,15 @@ /* This algorithm is a guess and works much better than the above. */ /* */ FT_Fixed mac_xscale = FT_SqrtFixed( - FT_MulFix( subglyph->transform.xx, - subglyph->transform.xx ) + - FT_MulFix( subglyph->transform.xy, - subglyph->transform.xy ) ); + (FT_Int32)FT_MulFix( subglyph->transform.xx, + subglyph->transform.xx ) + + (FT_Int32)FT_MulFix( subglyph->transform.xy, + subglyph->transform.xy ) ); FT_Fixed mac_yscale = FT_SqrtFixed( - FT_MulFix( subglyph->transform.yy, - subglyph->transform.yy ) + - FT_MulFix( subglyph->transform.yx, - subglyph->transform.yx ) ); + (FT_Int32)FT_MulFix( subglyph->transform.yy, + subglyph->transform.yy ) + + (FT_Int32)FT_MulFix( subglyph->transform.yx, + subglyph->transform.yx ) ); x = FT_MulFix( x, mac_xscale ); |