ReactOS 0.4.16-dev-329-g9223134
gxvmort5.c File Reference
#include "gxvmort.h"
Include dependency graph for gxvmort5.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GXV_mort_subtable_type5_StateOptRec_
 

Macros

#define FT_COMPONENT   trace_gxvmort
 
#define GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE   GXV_STATETABLE_HEADER_SIZE
 

Typedefs

typedef struct GXV_mort_subtable_type5_StateOptRec_ GXV_mort_subtable_type5_StateOptRec
 
typedef struct GXV_mort_subtable_type5_StateOptRec_GXV_mort_subtable_type5_StateOptRecData
 

Functions

 gxv_mort_subtable_type5_subtable_setup (FT_UShort table_size, FT_UShort classTable, FT_UShort stateArray, FT_UShort entryTable, FT_UShort *classTable_length_p, FT_UShort *stateArray_length_p, FT_UShort *entryTable_length_p, GXV_Validator gxvalid)
 
static void gxv_mort_subtable_type5_InsertList_validate (FT_UShort offset, FT_UShort count, FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_mort_subtable_type5_entry_validate (FT_Byte state, FT_UShort flags, GXV_StateTable_GlyphOffsetCPtr glyphOffset, FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
 gxv_mort_subtable_type5_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 

Macro Definition Documentation

◆ FT_COMPONENT

#define FT_COMPONENT   trace_gxvmort

Definition at line 39 of file gxvmort5.c.

◆ GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE

#define GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE   GXV_STATETABLE_HEADER_SIZE

Definition at line 56 of file gxvmort5.c.

Typedef Documentation

◆ GXV_mort_subtable_type5_StateOptRec

◆ GXV_mort_subtable_type5_StateOptRecData

Function Documentation

◆ gxv_mort_subtable_type5_entry_validate()

static void gxv_mort_subtable_type5_entry_validate ( FT_Byte  state,
FT_UShort  flags,
GXV_StateTable_GlyphOffsetCPtr  glyphOffset,
FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  gxvalid 
)
static

Definition at line 143 of file gxvmort5.c.

150 {
151#ifdef GXV_LOAD_UNUSED_VARS
152 FT_Bool setMark;
153 FT_Bool dontAdvance;
154 FT_Bool currentIsKashidaLike;
155 FT_Bool markedIsKashidaLike;
156 FT_Bool currentInsertBefore;
157 FT_Bool markedInsertBefore;
158#endif
159 FT_Byte currentInsertCount;
160 FT_Byte markedInsertCount;
161 FT_UShort currentInsertList;
162 FT_UShort markedInsertList;
163
164 FT_UNUSED( state );
165
166
167#ifdef GXV_LOAD_UNUSED_VARS
168 setMark = FT_BOOL( ( flags >> 15 ) & 1 );
169 dontAdvance = FT_BOOL( ( flags >> 14 ) & 1 );
170 currentIsKashidaLike = FT_BOOL( ( flags >> 13 ) & 1 );
171 markedIsKashidaLike = FT_BOOL( ( flags >> 12 ) & 1 );
172 currentInsertBefore = FT_BOOL( ( flags >> 11 ) & 1 );
173 markedInsertBefore = FT_BOOL( ( flags >> 10 ) & 1 );
174#endif
175
176 currentInsertCount = (FT_Byte)( ( flags >> 5 ) & 0x1F );
177 markedInsertCount = (FT_Byte)( flags & 0x001F );
178
179 currentInsertList = (FT_UShort)( glyphOffset->ul >> 16 );
180 markedInsertList = (FT_UShort)( glyphOffset->ul );
181
182 if ( 0 != currentInsertList && 0 != currentInsertCount )
183 {
185 currentInsertCount,
186 table,
187 limit,
188 gxvalid );
189 }
190
191 if ( 0 != markedInsertList && 0 != markedInsertCount )
192 {
194 markedInsertCount,
195 table,
196 limit,
197 gxvalid );
198 }
199 }
static int state
Definition: maze.c:121
#define FT_UNUSED(arg)
Definition: ftconfig.h:101
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
unsigned char FT_Byte
Definition: fttypes.h:154
unsigned short FT_UShort
Definition: fttypes.h:209
#define FT_BOOL(x)
Definition: fttypes.h:578
GLint limit
Definition: glext.h:10326
GLbitfield flags
Definition: glext.h:7161
static void gxv_mort_subtable_type5_InsertList_validate(FT_UShort offset, FT_UShort count, FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvmort5.c:100

Referenced by gxv_mort_subtable_type5_validate().

◆ gxv_mort_subtable_type5_InsertList_validate()

static void gxv_mort_subtable_type5_InsertList_validate ( FT_UShort  offset,
FT_UShort  count,
FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  gxvalid 
)
static

Definition at line 100 of file gxvmort5.c.

105 {
106 /*
107 * We don't know the range of insertion-glyph-list.
108 * Set range by whole of state table.
109 */
111
114
115 if ( optdata->classTable < offset &&
116 offset < optdata->classTable + *(optdata->classTable_length_p) )
117 GXV_TRACE(( " offset runs into ClassTable" ));
118 if ( optdata->stateArray < offset &&
119 offset < optdata->stateArray + *(optdata->stateArray_length_p) )
120 GXV_TRACE(( " offset runs into StateArray" ));
121 if ( optdata->entryTable < offset &&
122 offset < optdata->entryTable + *(optdata->entryTable_length_p) )
123 GXV_TRACE(( " offset runs into EntryTable" ));
124
125#ifndef GXV_LOAD_TRACE_VARS
126 GXV_LIMIT_CHECK( count * 2 );
127#else
128 while ( p < table + offset + ( count * 2 ) )
129 {
130 FT_UShort insert_glyphID;
131
132
133 GXV_LIMIT_CHECK( 2 );
134 insert_glyphID = FT_NEXT_USHORT( p );
135 GXV_TRACE(( " 0x%04x", insert_glyphID ));
136 }
137 GXV_TRACE(( "\n" ));
138#endif
139 }
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLfloat GLfloat p
Definition: glext.h:8902
GLintptr offset
Definition: glext.h:5920
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272
struct GXV_mort_subtable_type5_StateOptRec_ * GXV_mort_subtable_type5_StateOptRecData
if(dx< 0)
Definition: linetemp.h:194
GXV_StateTable_ValidatorRec statetable
Definition: gxvcommn.h:254

Referenced by gxv_mort_subtable_type5_entry_validate().

◆ gxv_mort_subtable_type5_subtable_setup()

gxv_mort_subtable_type5_subtable_setup ( FT_UShort  table_size,
FT_UShort  classTable,
FT_UShort  stateArray,
FT_UShort  entryTable,
FT_UShort classTable_length_p,
FT_UShort stateArray_length_p,
FT_UShort entryTable_length_p,
GXV_Validator  gxvalid 
)

Definition at line 67 of file gxvmort5.c.

75 {
78
79
81 classTable,
82 stateArray,
83 entryTable,
84 classTable_length_p,
85 stateArray_length_p,
86 entryTable_length_p,
87 gxvalid );
88
89 optdata->classTable = classTable;
90 optdata->stateArray = stateArray;
91 optdata->entryTable = entryTable;
92
93 optdata->classTable_length_p = classTable_length_p;
94 optdata->stateArray_length_p = stateArray_length_p;
95 optdata->entryTable_length_p = entryTable_length_p;
96 }
gxv_StateTable_subtable_setup(FT_UShort table_size, FT_UShort classTable, FT_UShort stateArray, FT_UShort entryTable, FT_UShort *classTable_length_p, FT_UShort *stateArray_length_p, FT_UShort *entryTable_length_p, GXV_Validator gxvalid)
Definition: gxvcommn.c:1182
LOCAL int table_size
Definition: write.c:65

Referenced by gxv_mort_subtable_type5_validate().

◆ gxv_mort_subtable_type5_validate()

gxv_mort_subtable_type5_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  gxvalid 
)

Definition at line 203 of file gxvmort5.c.

206 {
207 FT_Bytes p = table;
208
211
212
213 GXV_NAME_ENTER( "mort chain subtable type5 (Glyph Insertion)" );
214
216
217 gxvalid->statetable.optdata =
218 et;
220 NULL;
227
228 gxv_StateTable_validate( p, limit, gxvalid );
229
230 GXV_EXIT;
231 }
#define NULL
Definition: types.h:112
gxv_StateTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvcommn.c:1208
#define GXV_NAME_ENTER(name)
Definition: gxvcommn.h:301
@ GXV_GLYPHOFFSET_ULONG
Definition: gxvcommn.h:127
#define GXV_EXIT
Definition: gxvcommn.h:302
#define GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE
Definition: gxvmort5.c:56
gxv_mort_subtable_type5_subtable_setup(FT_UShort table_size, FT_UShort classTable, FT_UShort stateArray, FT_UShort entryTable, FT_UShort *classTable_length_p, FT_UShort *stateArray_length_p, FT_UShort *entryTable_length_p, GXV_Validator gxvalid)
Definition: gxvmort5.c:67
static void gxv_mort_subtable_type5_entry_validate(FT_Byte state, FT_UShort flags, GXV_StateTable_GlyphOffsetCPtr glyphOffset, FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvmort5.c:143
GXV_StateTable_Entry_Validate_Func entry_validate_func
Definition: gxvcommn.h:185
GXV_StateTable_Subtable_Setup_Func subtable_setup_func
Definition: gxvcommn.h:184
GXV_GlyphOffset_Format entry_glyphoffset_fmt
Definition: gxvcommn.h:181
GXV_StateTable_OptData_Load_Func optdata_load_func
Definition: gxvcommn.h:186

Referenced by gxv_mort_subtables_validate().