29 #define FT_COMPONENT trace_otvcommon 55 OTV_TRACE((
" (format %d)\n", CoverageFormat ));
57 switch ( CoverageFormat )
67 OTV_TRACE((
" (GlyphCount = %d)\n", GlyphCount ));
71 for ( i = 0; i < GlyphCount; ++
i )
77 if ( gid >= valid->glyph_count )
88 FT_UInt Start, End, StartCoverageIndex, last = 0;
93 OTV_TRACE((
" (RangeCount = %d)\n", RangeCount ));
98 for ( n = 0; n < RangeCount; n++ )
104 if ( Start > End || StartCoverageIndex != total )
107 if ( End >= valid->glyph_count )
110 if ( n > 0 && Start <= last )
113 total += End - Start + 1;
126 if ( expected_count != -1 && (
FT_UInt)expected_count != total )
154 switch ( CoverageFormat )
162 p += (
count - 1 ) * 6 + 2;
183 switch ( CoverageFormat )
199 result += End - Start + 1;
233 OTV_TRACE((
" (format %d)\n", ClassFormat ));
235 switch ( ClassFormat )
248 OTV_TRACE((
" (GlyphCount = %d)\n", GlyphCount ));
252 if ( StartGlyph + GlyphCount - 1 >= valid->glyph_count )
265 OTV_TRACE((
" (ClassRangeCount = %d)\n", ClassRangeCount ));
270 for ( n = 0; n < ClassRangeCount; n++ )
276 if ( Start > End || ( n > 0 && Start <= last ) )
279 if ( End >= valid->glyph_count )
321 if ( DeltaFormat < 1 || DeltaFormat > 3 )
324 if ( EndSize < StartSize )
327 count = EndSize - StartSize + 1;
350 FT_UInt LookupType, SubTableCount;
361 OTV_TRACE((
" (type %d)\n", LookupType ));
363 if ( LookupType == 0 || LookupType > valid->type_count )
366 validate = valid->type_funcs[LookupType - 1];
368 OTV_TRACE((
" (SubTableCount = %d)\n", SubTableCount ));
373 for ( ; SubTableCount > 0; SubTableCount-- )
395 OTV_TRACE((
" (LookupCount = %d)\n", LookupCount ));
399 valid->lookup_count = LookupCount;
402 for ( ; LookupCount > 0; LookupCount-- )
440 OTV_TRACE((
" (LookupCount = %d)\n", LookupCount ));
445 for ( ; LookupCount > 0; LookupCount-- )
476 OTV_TRACE((
" (FeatureCount = %d)\n", FeatureCount ));
480 valid->lookup_count = otv_LookupList_get_count( lookups );
483 for ( ; FeatureCount > 0; FeatureCount-- )
522 OTV_TRACE((
" (ReqFeatureIndex = %d)\n", ReqFeatureIndex ));
523 OTV_TRACE((
" (FeatureCount = %d)\n", FeatureCount ));
525 if ( ReqFeatureIndex != 0xFFFFU && ReqFeatureIndex >= valid->extra1 )
531 for ( ; FeatureCount > 0; FeatureCount-- )
551 FT_UInt DefaultLangSys, LangSysCount;
561 OTV_TRACE((
" (LangSysCount = %d)\n", LangSysCount ));
563 if ( DefaultLangSys != 0 )
569 for ( ; LangSysCount > 0; LangSysCount-- )
597 OTV_TRACE((
" (ScriptCount = %d)\n", ScriptCount ));
601 valid->extra1 = otv_Feature_get_count( features );
604 for ( ; ScriptCount > 0; ScriptCount-- )
659 valid->nesting_level++;
660 func = valid->func[valid->nesting_level];
662 for ( ; Count > 0; Count-- )
665 valid->nesting_level--;
694 valid->nesting_level++;
695 func = valid->func[valid->nesting_level];
697 for ( ; Count > 0; Count-- )
700 valid->nesting_level--;
727 for ( ; Count > 0; Count-- )
755 OTV_TRACE((
" (Count1 = %d)\n", Count1 ));
756 OTV_TRACE((
" (Count2 = %d)\n", Count2 ));
762 p += ( Count1 - 1 ) * 2;
764 for ( ; Count2 > 0; Count2-- )
787 FT_UInt BacktrackCount, InputCount, LookaheadCount;
796 OTV_TRACE((
" (BacktrackCount = %d)\n", BacktrackCount ));
799 p += BacktrackCount * 2;
802 if ( InputCount == 0 )
805 OTV_TRACE((
" (InputCount = %d)\n", InputCount ));
808 p += ( InputCount - 1 ) * 2;
812 OTV_TRACE((
" (LookaheadCount = %d)\n", LookaheadCount ));
815 p += LookaheadCount * 2;
823 for ( ; Count > 0; Count-- )
843 FT_UInt Coverage, ClassDef, ClassSetCount;
856 OTV_TRACE((
" (ClassSetCount = %d)\n", ClassSetCount ));
863 valid->nesting_level++;
864 func = valid->func[valid->nesting_level];
865 valid->extra1 = valid->lookup_count;
867 for ( ; ClassSetCount > 0; ClassSetCount-- )
876 valid->nesting_level--;
889 FT_UInt GlyphCount, Count, count1;
900 OTV_TRACE((
" (GlyphCount = %d)\n", GlyphCount ));
905 for ( count1 = GlyphCount; count1 > 0; count1-- )
908 for ( ; Count > 0; Count-- )
929 FT_UInt BacktrackClassDef, InputClassDef, LookaheadClassDef;
945 OTV_TRACE((
" (ChainClassSetCount = %d)\n", ChainClassSetCount ));
955 valid->nesting_level++;
956 func = valid->func[valid->nesting_level];
957 valid->extra1 = valid->lookup_count;
959 for ( ; ChainClassSetCount > 0; ChainClassSetCount-- )
968 valid->nesting_level--;
981 FT_UInt BacktrackGlyphCount, InputGlyphCount, LookaheadGlyphCount;
992 OTV_TRACE((
" (BacktrackGlyphCount = %d)\n", BacktrackGlyphCount ));
996 for ( ; BacktrackGlyphCount > 0; BacktrackGlyphCount-- )
1001 OTV_TRACE((
" (InputGlyphCount = %d)\n", InputGlyphCount ));
1005 for ( count1 = InputGlyphCount; count1 > 0; count1-- )
1010 OTV_TRACE((
" (LookaheadGlyphCount = %d)\n", LookaheadGlyphCount ));
1014 for ( ; LookaheadGlyphCount > 0; LookaheadGlyphCount-- )
1019 OTV_TRACE((
" (Count = %d)\n", count2 ));
1023 for ( ; count2 > 0; count2-- )
otv_ScriptList_validate(FT_Bytes table, FT_Bytes features, OTV_Validator valid)
#define FT_INVALID_FORMAT
otv_x_y_ux_sy(FT_Bytes table, OTV_Validator valid)
void(* OTV_Validate_Func)(FT_Bytes table, OTV_Validator valid)
otv_Feature_validate(FT_Bytes table, OTV_Validator valid)
otv_Coverage_get_last(FT_Bytes table)
otv_x_Ox(FT_Bytes table, OTV_Validator valid)
otv_u_x_y_Ox_sy(FT_Bytes table, OTV_Validator valid)
otv_Script_validate(FT_Bytes table, OTV_Validator valid)
otv_ClassDef_validate(FT_Bytes table, OTV_Validator valid)
otv_Lookup_validate(FT_Bytes table, OTV_Validator valid)
otv_x_ux(FT_Bytes table, OTV_Validator valid)
#define OTV_NAME_ENTER(name)
otv_LangSys_validate(FT_Bytes table, OTV_Validator valid)
#define OTV_LIMIT_CHECK(_count)
#define FT_NEXT_USHORT(buffer)
otv_GSUBGPOS_have_MarkAttachmentType_flag(FT_Bytes table)
otv_Coverage_validate(FT_Bytes table, OTV_Validator valid, FT_Int expected_count)
typedefFT_BEGIN_HEADER struct OTV_ValidatorRec_ * OTV_Validator
otv_Coverage_get_first(FT_Bytes table)
GLuint GLuint GLsizei count
otv_x_ux_y_uy_z_uz_p_sp(FT_Bytes table, OTV_Validator valid)
otv_u_C_x_Ox(FT_Bytes table, OTV_Validator valid)
otv_Device_validate(FT_Bytes table, OTV_Validator valid)
#define FT_INVALID_GLYPH_ID
otv_u_x_Ox_y_Oy_z_Oz_p_sp(FT_Bytes table, OTV_Validator valid)
GLenum GLsizei GLenum GLenum const GLvoid * table
otv_GSUBGPOS_get_Lookup_count(FT_Bytes table)
otv_FeatureList_validate(FT_Bytes table, FT_Bytes lookups, OTV_Validator valid)
otv_u_O_O_O_O_x_Onx(FT_Bytes table, OTV_Validator valid)
otv_Coverage_get_count(FT_Bytes table)
otv_LookupList_validate(FT_Bytes table, OTV_Validator valid)
otv_u_O_O_x_Onx(FT_Bytes table, OTV_Validator valid)