156 |
FT_UInt num_tables ) |
FT_UInt num_tables ) |
157 |
{ |
{ |
158 |
FT_Error error; |
FT_Error error; |
159 |
FT_UInt nn, has_head = 0; |
FT_UInt nn; |
160 |
|
FT_UInt has_head = 0, has_sing = 0, has_meta = 0; |
161 |
|
|
162 |
const FT_ULong glyx_tag = FT_MAKE_TAG( 'g', 'l', 'y', 'x' ); |
const FT_ULong glyx_tag = FT_MAKE_TAG( 'g', 'l', 'y', 'x' ); |
163 |
const FT_ULong locx_tag = FT_MAKE_TAG( 'l', 'o', 'c', 'x' ); |
const FT_ULong locx_tag = FT_MAKE_TAG( 'l', 'o', 'c', 'x' ); |
230 |
if ( FT_STREAM_SEEK( offset + 28 + 16*nn ) ) |
if ( FT_STREAM_SEEK( offset + 28 + 16*nn ) ) |
231 |
goto Bad_Format; |
goto Bad_Format; |
232 |
} |
} |
233 |
|
|
234 |
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS |
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS |
235 |
else if ( table.Tag == TTAG_bhed ) |
else if ( table.Tag == TTAG_bhed ) |
236 |
goto head_retry; |
goto head_retry; |
237 |
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ |
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ |
238 |
|
|
239 |
|
else if ( table.Tag == TTAG_SING ) |
240 |
|
has_sing = 1; |
241 |
|
else if ( table.Tag == TTAG_META ) |
242 |
|
has_meta = 1; |
243 |
} |
} |
244 |
|
|
245 |
|
/* when sing and meta are present, head is not present */ |
246 |
|
if ( has_sing && has_meta && has_head == 0 ) |
247 |
|
goto Exit; |
248 |
|
|
249 |
|
/* otherwise, treat a missing head as a failure */ |
250 |
if ( has_head == 0 ) |
if ( has_head == 0 ) |
251 |
goto Bad_Format; |
goto Bad_Format; |
252 |
|
|