38 #define FT_COMPONENT trace_gxvmorx 41 typedef struct GXV_morx_subtable_type2_StateOptRec_
54 #define GXV_MORX_SUBTABLE_TYPE2_HEADER_SIZE \ 55 ( GXV_XSTATETABLE_HEADER_SIZE + 4 + 4 + 4 ) 74 GXV_TRACE((
"offset to ligActionTable=0x%08x\n",
75 optdata->ligActionTable ));
76 GXV_TRACE((
"offset to componentTable=0x%08x\n",
77 optdata->componentTable ));
78 GXV_TRACE((
"offset to ligatureTable=0x%08x\n",
79 optdata->ligatureTable ));
84 gxv_morx_subtable_type2_subtable_setup(
FT_ULong table_size,
106 o[3] = optdata->ligActionTable;
107 o[4] = optdata->componentTable;
108 o[5] = optdata->ligatureTable;
109 l[0] = classTable_length_p;
110 l[1] = stateArray_length_p;
111 l[2] = entryTable_length_p;
112 l[3] = &(optdata->ligActionTable_length);
113 l[4] = &(optdata->componentTable_length);
114 l[5] = &(optdata->ligatureTable_length);
118 GXV_TRACE((
"classTable: offset=0x%08x length=0x%08x\n",
119 classTable, *classTable_length_p ));
120 GXV_TRACE((
"stateArray: offset=0x%08x length=0x%08x\n",
121 stateArray, *stateArray_length_p ));
122 GXV_TRACE((
"entryTable: offset=0x%08x length=0x%08x\n",
123 entryTable, *entryTable_length_p ));
124 GXV_TRACE((
"ligActionTable: offset=0x%08x length=0x%08x\n",
125 optdata->ligActionTable,
126 optdata->ligActionTable_length ));
127 GXV_TRACE((
"componentTable: offset=0x%08x length=0x%08x\n",
128 optdata->componentTable,
129 optdata->componentTable_length ));
130 GXV_TRACE((
"ligatureTable: offset=0x%08x length=0x%08x\n",
131 optdata->ligatureTable,
132 optdata->ligatureTable_length ));
138 #define GXV_MORX_LIGACTION_ENTRY_SIZE 4 142 gxv_morx_subtable_type2_ligActionIndex_validate(
151 FT_Bytes lat_base = table + optdata->ligActionTable;
154 FT_Bytes lat_limit = lat_base + optdata->ligActionTable;
159 GXV_TRACE((
"p < lat_base (%d byte rewind)\n", lat_base -
p ));
162 else if ( lat_limit <
p )
164 GXV_TRACE((
"lat_limit < p (%d byte overrun)\n",
p - lat_limit ));
171 #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 );
185 offset = lig_action & 0x3FFFFFFFUL;
189 if ( ( offset & 0x3FFF0000UL ) == 0x3FFF0000UL )
195 GXV_TRACE((
"ligature action table includes" 196 " too negative offset moving all GID" 197 " below defined range: 0x%04x\n",
201 else if ( ( offset & 0x3FFF0000UL ) == 0x0000000UL )
206 GXV_TRACE((
"ligature action table includes" 207 " too large offset moving all GID" 208 " over defined range: 0x%04x\n",
213 GXV_TRACE((
"ligature action table includes" 214 " invalid offset to add to 16-bit GID:" 215 " 0x%08x\n", offset ));
222 gxv_morx_subtable_type2_entry_validate(
230 #ifdef GXV_LOAD_UNUSED_VARS 242 #ifdef GXV_LOAD_UNUSED_VARS 249 ligActionIndex = glyphOffset_p->
u;
252 GXV_TRACE((
" reserved 14bit is non-zero\n" ));
254 if ( 0 < ligActionIndex )
255 gxv_morx_subtable_type2_ligActionIndex_validate(
256 table, ligActionIndex, valid );
261 gxv_morx_subtable_type2_ligatureTable_validate(
FT_Bytes table,
269 + optdata->ligatureTable_length;
272 GXV_NAME_ENTER(
"morx chain subtable type2 - substitutionTable" );
274 if ( 0 != optdata->ligatureTable )
284 if ( lig_gid < valid->
face->num_glyphs )
303 GXV_NAME_ENTER(
"morx chain subtable type2 (Ligature Substitution)" );
310 gxv_morx_subtable_type2_opttable_load;
312 gxv_morx_subtable_type2_subtable_setup;
316 gxv_morx_subtable_type2_entry_validate;
321 gxv_morx_subtable_type2_ligatureTable_validate(
table, valid );
#define GXV_NAME_ENTER(name)
gxv_XStateTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
struct GXV_morx_subtable_type2_StateOptRec_ * GXV_morx_subtable_type2_StateOptRecData
#define GXV_SET_ERR_IF_PARANOID(err)
GXV_XStateTable_Entry_Validate_Func entry_validate_func
GLenum GLuint GLint GLenum face
#define GXV_MORX_LIGACTION_ENTRY_SIZE
#define GXV_MORX_SUBTABLE_TYPE2_HEADER_SIZE
int entry_glyphoffset_fmt
GXV_XStateTable_Subtable_Setup_Func subtable_setup_func
GXV_XStateTable_ValidatorRec xstatetable
#define FT_NEXT_USHORT(buffer)
if(!abbox) return FT_THROW(Invalid_Argument)
GXV_XStateTable_OptData_Load_Func optdata_load_func
#define FT_INVALID_OFFSET
struct GXV_morx_subtable_type2_StateOptRec_ GXV_morx_subtable_type2_StateOptRec
#define FT_NEXT_ULONG(buffer)
#define FT_INVALID_GLYPH_ID
GLenum GLsizei GLenum GLenum const GLvoid * table
gxv_set_length_by_ulong_offset(FT_ULong *offset, FT_ULong **length, FT_ULong *buff, FT_UInt nmemb, FT_ULong limit, GXV_Validator valid)
#define GXV_LIMIT_CHECK(_count)
gxv_morx_subtable_type2_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator valid)