diff options
author | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2009-08-01 00:32:09 +0900 |
---|---|---|
committer | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2009-08-01 00:32:09 +0900 |
commit | 25dba9cfa8418b77f2af7ee5165f0d97dff98f0b (patch) | |
tree | 934c0c2c536766d59b74c4ac3cba04ac52d43ce0 /src | |
parent | e45e052279c609019822737421eec4f49fcd99cf (diff) | |
download | freetype2-25dba9cfa8418b77f2af7ee5165f0d97dff98f0b.tar.gz |
truetype: Extend TT_Face->num_locations for broken TTFs.
Diffstat (limited to 'src')
-rw-r--r-- | src/truetype/ttpload.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c index f691269d2..a311b03c0 100644 --- a/src/truetype/ttpload.c +++ b/src/truetype/ttpload.c @@ -95,7 +95,7 @@ error = TT_Err_Invalid_Table; goto Exit; } - face->num_locations = (FT_UInt)( table_len >> shift ); + face->num_locations = table_len >> shift; } else { @@ -107,16 +107,16 @@ error = TT_Err_Invalid_Table; goto Exit; } - face->num_locations = (FT_UInt)( table_len >> shift ); + face->num_locations = table_len >> shift; } - if ( face->num_locations != (FT_UInt)face->root.num_glyphs ) + if ( face->num_locations != (FT_ULong)face->root.num_glyphs ) { FT_TRACE2(( "glyph count mismatch! loca: %d, maxp: %d\n", face->num_locations, face->root.num_glyphs )); /* we only handle the case where `maxp' gives a larger value */ - if ( face->num_locations < (FT_UInt)face->root.num_glyphs ) + if ( face->num_locations < (FT_ULong)face->root.num_glyphs ) { FT_Long new_loca_len = (FT_Long)face->root.num_glyphs << shift; @@ -139,7 +139,7 @@ if ( new_loca_len <= dist ) { - face->num_locations = (FT_Long)face->root.num_glyphs; + face->num_locations = face->root.num_glyphs; table_len = new_loca_len; FT_TRACE2(( "adjusting num_locations to %d\n", |