30 #include FT_SFNT_NAMES_H 40 #define FT_COMPONENT trace_gxvjust 55 typedef struct GXV_just_DataRec_
65 #define GXV_JUST_DATA( a ) GXV_TABLE_DATA( just, a ) 74 if ( gid < valid->
face->num_glyphs )
77 GXV_TRACE((
"just table includes too large %s" 78 " GID=%d > %d (in maxp)\n",
91 #ifdef GXV_LOAD_UNUSED_VARS 103 #ifndef GXV_LOAD_UNUSED_VARS 104 p += 4 + 4 + 4 + 4 + 2 + 2;
115 if ( ( justClass & 0xFFFFFF80 ) != 0 )
117 GXV_TRACE((
"just table includes non-zero value" 118 " in unused justClass higher bits" 119 " of WidthDeltaPair" ));
138 for ( i = 0; i <
count; i++ )
140 GXV_TRACE((
"validating wdc pair %d/%d\n", i + 1, count ));
141 gxv_just_wdp_entry_validate( p,
limit, valid );
161 if (
limit <= wdc_end )
164 for ( i = 0; p <= wdc_end; i++ )
166 gxv_just_wdc_entry_validate( p,
limit, valid );
185 #ifdef GXV_LOAD_UNUSED_VARS 196 #ifdef GXV_LOAD_UNUSED_VARS 203 if ( lowerLimit >= upperLimit )
205 GXV_TRACE((
"just table includes invalid range spec:" 206 " lowerLimit(%d) > upperLimit(%d)\n" ));
210 for ( i = 0; i < decomposedCount; i++ )
217 gxv_just_check_max_gid( glyphs,
"type0:glyphs", valid );
236 gxv_just_check_max_gid( addGlyph,
"type1:addGlyph", valid );
248 #ifdef GXV_LOAD_UNUSED_VARS 256 #ifdef GXV_LOAD_UNUSED_VARS 264 if ( addGlyph != 0xFFFF )
265 gxv_just_check_max_gid( addGlyph,
"type2:addGlyph", valid );
267 gxv_just_check_max_gid( substGlyph,
"type2:substGlyph", valid );
293 if ( variantsAxis != 0x64756374 )
294 GXV_TRACE((
"variantsAxis 0x%08x is non default value",
297 if ( minimumLimit > noStretchValue )
298 GXV_TRACE((
"type4:minimumLimit 0x%08x > noStretchValue 0x%08x\n",
299 minimumLimit, noStretchValue ));
300 else if ( noStretchValue > maximumLimit )
301 GXV_TRACE((
"type4:noStretchValue 0x%08x > maximumLimit 0x%08x\n",
302 noStretchValue, maximumLimit ));
325 GXV_TRACE((
"type5: nonzero value 0x%04x in unused flags\n",
327 gxv_just_check_max_gid( glyph,
"type5:glyph", valid );
353 if ( ( actionClass & 0xFF80 ) != 0 )
356 if ( actionType == 0 )
357 gxv_just_actSubrecord_type0_validate( p,
limit, valid );
358 else if ( actionType == 1 )
359 gxv_just_actSubrecord_type1_validate( p,
limit, valid );
360 else if ( actionType == 2 )
361 gxv_just_actSubrecord_type2_validate( p,
limit, valid );
362 else if ( actionType == 3 )
364 else if ( actionType == 4 )
365 gxv_just_actSubrecord_type4_validate( p,
limit, valid );
366 else if ( actionType == 5 )
367 gxv_just_actSubrecord_type5_validate( p,
limit, valid );
389 GXV_TRACE((
"actionCount = %d\n", actionCount ));
391 for ( i = 0; i < actionCount; i++ )
393 gxv_just_actSubrecord_validate( p,
limit, valid );
404 gxv_just_pcTable_LookupValue_entry_validate(
FT_UShort glyph,
430 valid->
lookupval_func = gxv_just_pcTable_LookupValue_entry_validate;
450 gxv_just_pcLookupTable_validate( p,
limit, valid );
453 gxv_just_pcActionRecord_validate( p,
limit, valid );
463 gxv_just_classTable_entry_validate(
471 #ifdef GXV_LOAD_UNUSED_VARS 485 #ifndef GXV_LOAD_UNUSED_VARS 514 GXV_TRACE((
" justClassTable: coverage = 0x%04x (%s) ", coverage ));
515 if ( ( coverage & 0x4000 ) == 0 )
520 if ( subFeatureFlags )
521 GXV_TRACE((
" justClassTable: nonzero value (0x%08x)" 522 " in unused subFeatureFlags\n", subFeatureFlags ));
529 gxv_just_classTable_entry_validate;
540 gxv_just_wdcTable_LookupValue_validate(
FT_UShort glyph,
603 GXV_TRACE((
" (justClassTableOffset = 0x%04x)\n", justClassTableOffset ));
604 GXV_TRACE((
" (wdcTableOffset = 0x%04x)\n", wdcTableOffset ));
605 GXV_TRACE((
" (pcTableOffset = 0x%04x)\n", pcTableOffset ));
607 gxv_just_justData_lookuptable_validate( p,
limit, valid );
609 "just_LookupTable", odtect );
611 if ( wdcTableOffset )
613 gxv_just_widthDeltaClusters_validate(
614 valid->
root->base + wdcTableOffset,
limit, valid );
621 gxv_just_postcompTable_validate( valid->
root->base + pcTableOffset,
627 if ( justClassTableOffset )
629 gxv_just_justClassTable_validate(
630 valid->
root->base + justClassTableOffset,
limit, valid );
665 valid->
root = ftvalid;
669 FT_TRACE3((
"validating `just' table\n" ));
692 GXV_TRACE((
" (horizOffset = %d)\n", horizOffset ));
693 GXV_TRACE((
" (vertOffset = %d)\n", vertOffset ));
697 if ( 0 < horizOffset )
699 gxv_just_justData_validate(
table + horizOffset,
limit, valid );
701 "horizJustData", odtect );
704 if ( 0 < vertOffset )
706 gxv_just_justData_validate(
table + vertOffset,
limit, valid );
708 "vertJustData", odtect );
GLenum GLuint GLenum GLsizei length
GXV_StateTable_Subtable_Setup_Func subtable_setup_func
struct GXV_just_DataRec_ GXV_just_DataRec
#define FT_INVALID_FORMAT
#define GXV_NAME_ENTER(name)
GLuint GLdouble GLdouble GLint GLint order
#define GXV_ODTECT(n, odtect)
struct GXV_just_DataRec_ * GXV_just_Data
#define GXV_SET_ERR_IF_PARANOID(err)
GLenum GLuint GLint GLenum face
GXV_StateTable_Entry_Validate_Func entry_validate_func
gxv_just_validate(FT_Bytes table, FT_Face face, FT_Validator ftvalid)
#define FT_TRACE4(varformat)
GXV_StateTable_ValidatorRec statetable
GXV_GlyphOffset_Format entry_glyphoffset_fmt
GXV_StateTable_OptData_Load_Func optdata_load_func
typedefFT_BEGIN_HEADER struct FT_ValidatorRec_ volatile * FT_Validator
#define GXV_ODTECT_INIT(odtect)
gxv_odtect_validate(GXV_odtect_Range odtect, GXV_Validator valid)
gxv_LookupTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
#define FT_NEXT_USHORT(buffer)
#define FT_TRACE3(varformat)
#define FT_INVALID_OFFSET
#define IS_PARANOID_VALIDATION
#define FT_NEXT_ULONG(buffer)
GLuint GLuint GLsizei count
#define FT_INVALID_GLYPH_ID
GXV_Lookup_Value_Validate_Func lookupval_func
GXV_LookupValue_SignSpec lookupval_sign
gxv_odtect_add_range(FT_Bytes start, FT_ULong length, const FT_String *name, GXV_odtect_Range odtect)
GLenum GLsizei GLenum GLenum const GLvoid * table
gxv_StateTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define GXV_LIMIT_CHECK(_count)