25 |
|
|
26 |
|
|
27 |
#include "gxvmort.h" |
#include "gxvmort.h" |
28 |
|
#include "gxvfeat.h" |
29 |
|
|
30 |
|
|
31 |
/*************************************************************************/ |
/*************************************************************************/ |
89 |
* nFeatureFlags is typed to FT_UInt to accept that in |
* nFeatureFlags is typed to FT_UInt to accept that in |
90 |
* mort (typed FT_UShort) and morx (typed FT_ULong). |
* mort (typed FT_UShort) and morx (typed FT_ULong). |
91 |
*/ |
*/ |
92 |
static void |
FT_LOCAL_DEF( void ) |
93 |
gxv_mort_featurearray_validate( FT_Bytes table, |
gxv_mort_featurearray_validate( FT_Bytes table, |
94 |
FT_Bytes limit, |
FT_Bytes limit, |
95 |
FT_UInt nFeatureFlags, |
FT_UInt nFeatureFlags, |
121 |
} |
} |
122 |
|
|
123 |
|
|
124 |
static void |
FT_LOCAL_DEF( void ) |
125 |
gxv_mort_coverage_validate( FT_UShort coverage, |
gxv_mort_coverage_validate( FT_UShort coverage, |
126 |
GXV_Validator valid ) |
GXV_Validator valid ) |
127 |
{ |
{ |
185 |
coverage = FT_NEXT_USHORT( p ); |
coverage = FT_NEXT_USHORT( p ); |
186 |
subFeatureFlags = FT_NEXT_ULONG( p ); |
subFeatureFlags = FT_NEXT_ULONG( p ); |
187 |
|
|
188 |
GXV_TRACE(( "validate chain subtable %d/%d (%d bytes)\n", |
GXV_TRACE(( "validating chain subtable %d/%d (%d bytes)\n", |
189 |
i + 1, nSubtables, length )); |
i + 1, nSubtables, length )); |
190 |
type = coverage & 0x0007; |
type = coverage & 0x0007; |
191 |
rest = length - ( 2 + 2 + 4 ); |
rest = length - ( 2 + 2 + 4 ); |
259 |
valid->face = face; |
valid->face = face; |
260 |
limit = valid->root->limit; |
limit = valid->root->limit; |
261 |
|
|
262 |
FT_TRACE3(( "validation mort table\n" )); |
FT_TRACE3(( "validating `mort' table\n" )); |
263 |
GXV_INIT; |
GXV_INIT; |
264 |
|
|
265 |
GXV_LIMIT_CHECK( 4 + 4 ); |
GXV_LIMIT_CHECK( 4 + 4 ); |
271 |
|
|
272 |
for ( i = 0; i < nChains; i++ ) |
for ( i = 0; i < nChains; i++ ) |
273 |
{ |
{ |
274 |
GXV_TRACE(( "validate chain %d/%d\n", i + 1, nChains )); |
GXV_TRACE(( "validating chain %d/%d\n", i + 1, nChains )); |
275 |
GXV_32BIT_ALIGNMENT_VALIDATE( p - table ); |
GXV_32BIT_ALIGNMENT_VALIDATE( p - table ); |
276 |
gxv_mort_chain_validate( p, limit, valid ); |
gxv_mort_chain_validate( p, limit, valid ); |
277 |
p += valid->subtable_length; |
p += valid->subtable_length; |