diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2018-12-10 14:59:49 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-01-31 10:40:41 +0000 |
commit | 02280535bea08395871722f733aaaed70c992260 (patch) | |
tree | 8ff7fd6a26710645d18887fad6299ae7debfded1 /src/3rdparty/freetype/src/gxvalid/gxvcommn.c | |
parent | 93a803a6de27d9eb57931c431b5f3d074914f693 (diff) |
Update bundled Freetype to 2.9.1
This is required to support the new emoji font on Android 9.
[ChangeLog][Freetype] Upgraded bundled Freetype version to 2.9.1.
This also adds support for the latest emoji font in use on
Android 9.
Fixes: QTBUG-70657
Change-Id: I99be72f0d23c20aca122b8fdadd4ded87b2edce1
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/3rdparty/freetype/src/gxvalid/gxvcommn.c')
-rw-r--r-- | src/3rdparty/freetype/src/gxvalid/gxvcommn.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/3rdparty/freetype/src/gxvalid/gxvcommn.c b/src/3rdparty/freetype/src/gxvalid/gxvcommn.c index 93f6ffbe23..b96601108b 100644 --- a/src/3rdparty/freetype/src/gxvalid/gxvcommn.c +++ b/src/3rdparty/freetype/src/gxvalid/gxvcommn.c @@ -4,7 +4,7 @@ /* */ /* TrueTypeGX/AAT common tables validation (body). */ /* */ -/* Copyright 2004-2015 by */ +/* Copyright 2004-2018 by */ /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ @@ -454,7 +454,7 @@ } - /* ================= Segment Single Format 2 Loolup Table ============== */ + /* ================= Segment Single Format 2 Lookup Table ============== */ /* * Apple spec says: * @@ -789,7 +789,7 @@ FT_INVALID_FORMAT; func = fmt_funcs_table[format]; - if ( func == NULL ) + if ( !func ) FT_INVALID_FORMAT; func( p, limit, gxvalid ); @@ -900,7 +900,7 @@ for ( i = 0; i < nnames; i++ ) { if ( FT_Get_Sfnt_Name( gxvalid->face, i, &name ) != FT_Err_Ok ) - continue ; + continue; if ( name.name_id == name_index ) goto Out; @@ -972,7 +972,7 @@ FT_UShort i; - ft_memset( nGlyphInClass, 0, 256 ); + FT_MEM_ZERO( nGlyphInClass, 256 ); for ( i = 0; i < nGlyphs; i++ ) @@ -1159,13 +1159,9 @@ case GXV_GLYPHOFFSET_LONG: glyphOffset.l = FT_NEXT_LONG( p ); break; - - default: - GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT ); - goto Exit; } - if ( NULL != gxvalid->statetable.entry_validate_func ) + if ( gxvalid->statetable.entry_validate_func ) gxvalid->statetable.entry_validate_func( state, flags, &glyphOffset, @@ -1174,7 +1170,6 @@ gxvalid ); } - Exit: *length_p = (FT_UShort)( p - table ); GXV_EXIT; @@ -1249,10 +1244,10 @@ if ( stateSize > 0xFF ) FT_INVALID_DATA; - if ( gxvalid->statetable.optdata_load_func != NULL ) + if ( gxvalid->statetable.optdata_load_func ) gxvalid->statetable.optdata_load_func( p, limit, gxvalid ); - if ( gxvalid->statetable.subtable_setup_func != NULL) + if ( gxvalid->statetable.subtable_setup_func ) setup_func = gxvalid->statetable.subtable_setup_func; else setup_func = gxv_StateTable_subtable_setup; @@ -1477,7 +1472,7 @@ if ( ( p + ( maxEntry + 1 ) * entrySize ) > limit ) FT_INVALID_TOO_SHORT; - for (entry = 0; entry <= maxEntry ; entry++ ) + for (entry = 0; entry <= maxEntry; entry++ ) { FT_UShort newState_idx; FT_UShort flags; @@ -1539,7 +1534,7 @@ goto Exit; } - if ( NULL != gxvalid->xstatetable.entry_validate_func ) + if ( gxvalid->xstatetable.entry_validate_func ) gxvalid->xstatetable.entry_validate_func( state, flags, &glyphOffset, @@ -1596,10 +1591,10 @@ GXV_TRACE(( "StateTable Subtables\n" )); - if ( gxvalid->xstatetable.optdata_load_func != NULL ) + if ( gxvalid->xstatetable.optdata_load_func ) gxvalid->xstatetable.optdata_load_func( p, limit, gxvalid ); - if ( gxvalid->xstatetable.subtable_setup_func != NULL ) + if ( gxvalid->xstatetable.subtable_setup_func ) setup_func = gxvalid->xstatetable.subtable_setup_func; else setup_func = gxv_XStateTable_subtable_setup; |