diff options
author | David 'Digit' Turner <digit@google.com> | 2011-08-17 18:21:28 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2011-08-17 18:25:40 +0200 |
commit | aeb407daf3711a10a27f3bc2223c5eb05158076e (patch) | |
tree | 570010914e8c91992ea388f2319611655c7d4b0c /src/truetype/ttpload.c | |
parent | 3053d1b9db55099918843889e4809ce97483ca9f (diff) | |
download | android_external_freetype-aeb407daf3711a10a27f3bc2223c5eb05158076e.tar.gz android_external_freetype-aeb407daf3711a10a27f3bc2223c5eb05158076e.tar.bz2 android_external_freetype-aeb407daf3711a10a27f3bc2223c5eb05158076e.zip |
Update to FreeType 2.4.6+
This patch updates our copy of the FreeType sources to 2.4.6+.
More precisely, it contains source code corresponding to the
state of the upstream repository at the following hash
submitted on August 16 2001:
c3fb981e2ac79acad09d5673352646696472f55e
This corresponds to 2.4.6 with 7 more patches applied on top
of it to fix bugs in the TrueType interpreter and the CFF parser.
Change-Id: I9f3ac736d616020c8d10fd1d4e4be466f35fb6e7
Diffstat (limited to 'src/truetype/ttpload.c')
-rw-r--r-- | src/truetype/ttpload.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c index 68a5453..818b29d 100644 --- a/src/truetype/ttpload.c +++ b/src/truetype/ttpload.c @@ -4,7 +4,7 @@ /* */ /* TrueType-specific tables loader (body). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */ +/* Copyright 1996-2002, 2004-2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -110,15 +110,16 @@ face->num_locations = table_len >> shift; } - if ( face->num_locations != (FT_ULong)face->root.num_glyphs ) + if ( face->num_locations != (FT_ULong)face->root.num_glyphs + 1 ) { FT_TRACE2(( "glyph count mismatch! loca: %d, maxp: %d\n", - face->num_locations, face->root.num_glyphs )); + face->num_locations - 1, face->root.num_glyphs )); /* we only handle the case where `maxp' gives a larger value */ - if ( face->num_locations < (FT_ULong)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; + FT_Long new_loca_len = + ( (FT_Long)( face->root.num_glyphs ) + 1 ) << shift; TT_Table entry = face->dir_tables; TT_Table limit = entry + face->num_tables; @@ -145,7 +146,7 @@ if ( new_loca_len <= dist ) { - face->num_locations = face->root.num_glyphs; + face->num_locations = face->root.num_glyphs + 1; table_len = new_loca_len; FT_TRACE2(( "adjusting num_locations to %d\n", |