diff options
author | Behdad Esfahbod <behdad@google.com> | 2014-08-08 17:55:11 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@google.com> | 2014-08-08 17:59:36 -0400 |
commit | 9c745321260bb728ab1cd1c8fd5f075854b2ad49 (patch) | |
tree | 86c9ee0214cac2870a94905e4240732413ed768b /src/truetype/ttgload.c | |
parent | ec0bab5697bb31ba980810145f62e3799946ec60 (diff) | |
download | android_external_freetype-9c745321260bb728ab1cd1c8fd5f075854b2ad49.tar.gz android_external_freetype-9c745321260bb728ab1cd1c8fd5f075854b2ad49.tar.bz2 android_external_freetype-9c745321260bb728ab1cd1c8fd5f075854b2ad49.zip |
Update freetype to e1394d56752cac3bd68ab2358a8e1384ce7b9aaastaging/cm-12.0-cafstaging/cm-12.0
Integrated patches from freetype2 git repository, up to hashval
e1394d56752cac3bd68ab2358a8e1384ce7b9aaa, which is post-2.5.3.
Most recent commit message from freetype git:
Minor documentation improvement.
Noteworthy patches included:
Fix Savannah bug #41697, part 2.
Fix Savannah bug #41697, part 1.
Bug: 16575323
Change-Id: I4f8f9375afd2540618b3ebf6152d77b743975dce
Diffstat (limited to 'src/truetype/ttgload.c')
-rw-r--r-- | src/truetype/ttgload.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index b10e390..ff2b339 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -4,7 +4,7 @@ /* */ /* TrueType Glyph Loader (body). */ /* */ -/* Copyright 1996-2013 */ +/* Copyright 1996-2014 */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -99,13 +99,13 @@ else if ( face->os2.version != 0xFFFFU ) { - *tsb = face->os2.sTypoAscender - yMax; + *tsb = (FT_Short)( face->os2.sTypoAscender - yMax ); *ah = face->os2.sTypoAscender - face->os2.sTypoDescender; } else { - *tsb = face->horizontal.Ascender - yMax; + *tsb = (FT_Short)( face->horizontal.Ascender - yMax ); *ah = face->horizontal.Ascender - face->horizontal.Descender; } @@ -2120,7 +2120,7 @@ FT_Bool reexecute = FALSE; - if ( !size->cvt_ready ) + if ( size->bytecode_ready < 0 || size->cvt_ready < 0 ) { FT_Error error = tt_size_ready_bytecode( size, pedantic ); @@ -2128,6 +2128,10 @@ if ( error ) return error; } + else if ( size->bytecode_ready ) + return size->bytecode_ready; + else if ( size->cvt_ready ) + return size->cvt_ready; /* query new execution context */ exec = size->debug ? size->context @@ -2238,12 +2242,15 @@ if ( reexecute ) { - FT_UInt i; + FT_UInt i; + FT_Error error; for ( i = 0; i < size->cvt_size; i++ ) size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale ); - tt_size_run_prep( size, pedantic ); + error = tt_size_run_prep( size, pedantic ); + if ( error ) + return error; } /* see whether the cvt program has disabled hinting */ @@ -2346,8 +2353,6 @@ TT_LoaderRec loader; - error = FT_Err_Ok; - FT_TRACE1(( "TT_Load_Glyph: glyph index %d\n", glyph_index )); #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS |