38 #define FT_COMPONENT trace_gxvmort 41 typedef struct GXV_mort_subtable_type2_StateOptRec_
53 #define GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE \ 54 ( GXV_STATETABLE_HEADER_SIZE + 2 + 2 + 2 ) 72 GXV_TRACE((
"offset to ligActionTable=0x%04x\n",
73 optdata->ligActionTable ));
74 GXV_TRACE((
"offset to componentTable=0x%04x\n",
75 optdata->componentTable ));
76 GXV_TRACE((
"offset to ligatureTable=0x%04x\n",
77 optdata->ligatureTable ));
82 gxv_mort_subtable_type2_subtable_setup(
FT_UShort table_size,
104 o[3] = optdata->ligActionTable;
105 o[4] = optdata->componentTable;
106 o[5] = optdata->ligatureTable;
107 l[0] = classTable_length_p;
108 l[1] = stateArray_length_p;
109 l[2] = entryTable_length_p;
110 l[3] = &(optdata->ligActionTable_length);
111 l[4] = &(optdata->componentTable_length);
112 l[5] = &(optdata->ligatureTable_length);
116 GXV_TRACE((
"classTable: offset=0x%04x length=0x%04x\n",
117 classTable, *classTable_length_p ));
118 GXV_TRACE((
"stateArray: offset=0x%04x length=0x%04x\n",
119 stateArray, *stateArray_length_p ));
120 GXV_TRACE((
"entryTable: offset=0x%04x length=0x%04x\n",
121 entryTable, *entryTable_length_p ));
122 GXV_TRACE((
"ligActionTable: offset=0x%04x length=0x%04x\n",
123 optdata->ligActionTable,
124 optdata->ligActionTable_length ));
125 GXV_TRACE((
"componentTable: offset=0x%04x length=0x%04x\n",
126 optdata->componentTable,
127 optdata->componentTable_length ));
128 GXV_TRACE((
"ligatureTable: offset=0x%04x length=0x%04x\n",
129 optdata->ligatureTable,
130 optdata->ligatureTable_length ));
137 gxv_mort_subtable_type2_ligActionOffset_validate(
148 FT_Bytes lat_limit = lat_base + optdata->ligActionTable;
154 GXV_TRACE((
"too short offset 0x%04x: p < lat_base (%d byte rewind)\n",
155 ligActionOffset, lat_base -
p ));
160 else if ( lat_limit <
p )
162 GXV_TRACE((
"too large offset 0x%04x: lat_limit < p (%d byte overrun)\n",
163 ligActionOffset,
p - lat_limit ));
172 #ifdef GXV_LOAD_UNUSED_VARS 180 #ifdef GXV_LOAD_UNUSED_VARS 181 last = (
FT_UShort)( ( lig_action >> 31 ) & 1 );
182 store = (
FT_UShort)( ( lig_action >> 30 ) & 1 );
186 offset = lig_action & 0x3FFFFFFFUL;
187 if ( offset * 2 < optdata->ligatureTable )
190 " 2 x offset < ligatureTable (%d byte rewind)\n",
191 offset, optdata->ligatureTable - offset * 2 ));
194 }
else if ( offset * 2 >
195 optdata->ligatureTable + optdata->ligatureTable_length )
198 " 2 x offset > ligatureTable + ligatureTable_length" 199 " (%d byte overrun)\n",
201 optdata->ligatureTable + optdata->ligatureTable_length
211 gxv_mort_subtable_type2_entry_validate(
219 #ifdef GXV_LOAD_UNUSED_VARS 230 #ifdef GXV_LOAD_UNUSED_VARS 238 gxv_mort_subtable_type2_ligActionOffset_validate(
table, offset,
244 gxv_mort_subtable_type2_ligatureTable_validate(
FT_Bytes table,
252 + optdata->ligatureTable_length;
255 GXV_NAME_ENTER(
"mort chain subtable type2 - substitutionTable" );
256 if ( 0 != optdata->ligatureTable )
285 GXV_NAME_ENTER(
"mort chain subtable type2 (Ligature Substitution)" );
292 gxv_mort_subtable_type2_opttable_load;
294 gxv_mort_subtable_type2_subtable_setup;
298 gxv_mort_subtable_type2_entry_validate;
303 gxv_mort_subtable_type2_ligatureTable_validate(
table, valid );
GXV_StateTable_Subtable_Setup_Func subtable_setup_func
#define GXV_NAME_ENTER(name)
#define GXV_SET_ERR_IF_PARANOID(err)
GXV_StateTable_Entry_Validate_Func entry_validate_func
#define GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE
GXV_StateTable_ValidatorRec statetable
GXV_GlyphOffset_Format entry_glyphoffset_fmt
GXV_StateTable_OptData_Load_Func optdata_load_func
#define GXV_32BIT_ALIGNMENT_VALIDATE(a)
#define FT_NEXT_USHORT(buffer)
struct GXV_mort_subtable_type2_StateOptRec_ * GXV_mort_subtable_type2_StateOptRecData
#define FT_INVALID_OFFSET
struct GXV_mort_subtable_type2_StateOptRec_ GXV_mort_subtable_type2_StateOptRec
gxv_set_length_by_ushort_offset(FT_UShort *offset, FT_UShort **length, FT_UShort *buff, FT_UInt nmemb, FT_UShort limit, GXV_Validator valid)
#define FT_NEXT_ULONG(buffer)
#define FT_INVALID_GLYPH_ID
GLenum GLsizei GLenum GLenum const GLvoid * table
gxv_StateTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
gxv_mort_subtable_type2_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
#define GXV_LIMIT_CHECK(_count)