diff options
author | marha <marha@users.sourceforge.net> | 2009-12-22 14:14:24 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-12-22 14:14:24 +0000 |
commit | 4284aeba874b9168f2228c59639bec8346a56796 (patch) | |
tree | d51ffb4507e0cae24b0875d8bb6b2c037829a684 /freetype/src/truetype/ttpload.c | |
parent | c438f190eedc71ee8dd14e14fec660e98d3dc0bf (diff) | |
parent | 0695dfb71ca6fe132d15a4d0890e8a868183adf9 (diff) | |
download | vcxsrv-4284aeba874b9168f2228c59639bec8346a56796.tar.gz vcxsrv-4284aeba874b9168f2228c59639bec8346a56796.tar.bz2 vcxsrv-4284aeba874b9168f2228c59639bec8346a56796.zip |
svn merge ^/branches/released
Diffstat (limited to 'freetype/src/truetype/ttpload.c')
-rw-r--r-- | freetype/src/truetype/ttpload.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/freetype/src/truetype/ttpload.c b/freetype/src/truetype/ttpload.c index 296f30d0d..39daa38c2 100644 --- a/freetype/src/truetype/ttpload.c +++ b/freetype/src/truetype/ttpload.c @@ -4,7 +4,7 @@ /* */ /* TrueType-specific tables loader (body). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -58,7 +58,6 @@ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ - FT_LOCAL_DEF( FT_Error ) tt_face_load_loca( TT_Face face, FT_Stream stream ) @@ -92,11 +91,11 @@ if ( table_len >= 0x40000L ) { - FT_TRACE2(( "table too large!\n" )); + FT_TRACE2(( "table too large\n" )); error = TT_Err_Invalid_Table; goto Exit; } - face->num_locations = (FT_UInt)( table_len >> shift ); + face->num_locations = table_len >> shift; } else { @@ -104,20 +103,20 @@ if ( table_len >= 0x20000L ) { - FT_TRACE2(( "table too large!\n" )); + FT_TRACE2(( "table too large\n" )); 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; @@ -140,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", @@ -204,12 +203,11 @@ } } - /* It isn't mentioned explicitly that the `loca' table must be */ - /* ordered, but implicitly it refers to the length of an entry */ - /* as the difference between the current and the next position. */ - /* Anyway, there do exist (malformed) fonts which don't obey */ - /* this rule, so we are only able to provide an upper bound for */ - /* the size. */ + /* The `loca' table must be ordered; it refers to the length of */ + /* an entry as the difference between the current and the next */ + /* position. However, there do exist (malformed) fonts which */ + /* don't obey this rule, so we are only able to provide an */ + /* upper bound for the size. */ /* */ /* We get (intentionally) a wrong, non-zero result in case the */ /* `glyf' table is missing. */ @@ -267,7 +265,7 @@ error = face->goto_table( face, TTAG_cvt, stream, &table_len ); if ( error ) { - FT_TRACE2(( "is missing!\n" )); + FT_TRACE2(( "is missing\n" )); face->cvt_size = 0; face->cvt = NULL; @@ -352,7 +350,7 @@ face->font_program_size = 0; error = TT_Err_Ok; - FT_TRACE2(( "is missing!\n" )); + FT_TRACE2(( "is missing\n" )); } else { @@ -413,7 +411,7 @@ face->cvt_program_size = 0; error = TT_Err_Ok; - FT_TRACE2(( "is missing!\n" )); + FT_TRACE2(( "is missing\n" )); } else { |