ReactOS 0.4.16-dev-297-gc569aee
gxvmorx1.c File Reference
#include "gxvmorx.h"
Include dependency graph for gxvmorx1.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GXV_morx_subtable_type1_StateOptRec_
 

Macros

#define FT_COMPONENT   trace_gxvmorx
 
#define GXV_MORX_SUBTABLE_TYPE1_HEADER_SIZE    ( GXV_STATETABLE_HEADER_SIZE + 2 )
 

Typedefs

typedef struct GXV_morx_subtable_type1_StateOptRec_ GXV_morx_subtable_type1_StateOptRec
 
typedef struct GXV_morx_subtable_type1_StateOptRec_GXV_morx_subtable_type1_StateOptRecData
 

Functions

static void gxv_morx_subtable_type1_substitutionTable_load (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_morx_subtable_type1_subtable_setup (FT_ULong table_size, FT_ULong classTable, FT_ULong stateArray, FT_ULong entryTable, FT_ULong *classTable_length_p, FT_ULong *stateArray_length_p, FT_ULong *entryTable_length_p, GXV_Validator gxvalid)
 
static void gxv_morx_subtable_type1_entry_validate (FT_UShort state, FT_UShort flags, GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_morx_subtable_type1_LookupValue_validate (FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
 
static GXV_LookupValueDesc gxv_morx_subtable_type1_LookupFmt4_transit (FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator gxvalid)
 
static void gxv_morx_subtable_type1_substitutionTable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
 gxv_morx_subtable_type1_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 

Macro Definition Documentation

◆ FT_COMPONENT

#define FT_COMPONENT   trace_gxvmorx

Definition at line 39 of file gxvmorx1.c.

◆ GXV_MORX_SUBTABLE_TYPE1_HEADER_SIZE

#define GXV_MORX_SUBTABLE_TYPE1_HEADER_SIZE    ( GXV_STATETABLE_HEADER_SIZE + 2 )

Definition at line 52 of file gxvmorx1.c.

Typedef Documentation

◆ GXV_morx_subtable_type1_StateOptRec

◆ GXV_morx_subtable_type1_StateOptRecData

Function Documentation

◆ gxv_morx_subtable_type1_entry_validate()

static void gxv_morx_subtable_type1_entry_validate ( FT_UShort  state,
FT_UShort  flags,
GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  gxvalid 
)
static

Definition at line 104 of file gxvmorx1.c.

111 {
112#ifdef GXV_LOAD_TRACE_VARS
113 FT_UShort setMark;
114 FT_UShort dontAdvance;
115#endif
117 FT_Short markIndex;
118 FT_Short currentIndex;
119
122
123 FT_UNUSED( state );
124 FT_UNUSED( table );
125 FT_UNUSED( limit );
126
127
128#ifdef GXV_LOAD_TRACE_VARS
129 setMark = (FT_UShort)( ( flags >> 15 ) & 1 );
130 dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
131#endif
132
133 reserved = (FT_UShort)( flags & 0x3FFF );
134
135 markIndex = (FT_Short)( glyphOffset_p->ul >> 16 );
136 currentIndex = (FT_Short)( glyphOffset_p->ul );
137
138 GXV_TRACE(( " setMark=%01d dontAdvance=%01d\n",
139 setMark, dontAdvance ));
140
141 if ( 0 < reserved )
142 {
143 GXV_TRACE(( " non-zero bits found in reserved range\n" ));
145 }
146
147 GXV_TRACE(( "markIndex = %d, currentIndex = %d\n",
148 markIndex, currentIndex ));
149
150 if ( optdata->substitutionTable_num_lookupTables < markIndex + 1 )
152 (FT_UShort)( markIndex + 1 );
153
154 if ( optdata->substitutionTable_num_lookupTables < currentIndex + 1 )
156 (FT_UShort)( currentIndex + 1 );
157 }
static int state
Definition: maze.c:121
r reserved
Definition: btrfs.c:3006
#define FT_UNUSED(arg)
Definition: ftconfig.h:101
unsigned short FT_UShort
Definition: fttypes.h:209
signed short FT_Short
Definition: fttypes.h:198
#define FT_INVALID_DATA
Definition: ftvalid.h:150
GLint limit
Definition: glext.h:10326
GLbitfield flags
Definition: glext.h:7161
#define GXV_SET_ERR_IF_PARANOID(err)
Definition: gxvcommn.h:66
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
struct GXV_morx_subtable_type1_StateOptRec_ * GXV_morx_subtable_type1_StateOptRecData
GXV_XStateTable_ValidatorRec xstatetable
Definition: gxvcommn.h:255

Referenced by gxv_morx_subtable_type1_validate().

◆ gxv_morx_subtable_type1_LookupFmt4_transit()

static GXV_LookupValueDesc gxv_morx_subtable_type1_LookupFmt4_transit ( FT_UShort  relative_gindex,
GXV_LookupValueCPtr  base_value_p,
FT_Bytes  lookuptbl_limit,
GXV_Validator  gxvalid 
)
static

Definition at line 175 of file gxvmorx1.c.

180 {
181 FT_Bytes p;
185
186 /* XXX: check range? */
187 offset = (FT_UShort)( base_value_p->u +
188 relative_gindex * sizeof ( FT_UShort ) );
189
190 p = gxvalid->lookuptbl_head + offset;
191 limit = lookuptbl_limit;
192
193 GXV_LIMIT_CHECK ( 2 );
194 value.u = FT_NEXT_USHORT( p );
195
196 return value;
197 }
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
GLfloat GLfloat p
Definition: glext.h:8902
GLintptr offset
Definition: glext.h:5920
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272
FT_Bytes lookuptbl_head
Definition: gxvcommn.h:249
Definition: pdh_main.c:94
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList

Referenced by gxv_morx_subtable_type1_substitutionTable_validate().

◆ gxv_morx_subtable_type1_LookupValue_validate()

static void gxv_morx_subtable_type1_LookupValue_validate ( FT_UShort  glyph,
GXV_LookupValueCPtr  value_p,
GXV_Validator  gxvalid 
)
static

Definition at line 161 of file gxvmorx1.c.

164 {
165 FT_UNUSED( glyph ); /* for the non-debugging case */
166
167 GXV_TRACE(( "morx subtable type1 subst.: %d -> %d\n", glyph, value_p->u ));
168
169 if ( value_p->u > gxvalid->face->num_glyphs )
171 }
#define FT_INVALID_GLYPH_ID
Definition: ftvalid.h:146
FT_Long num_glyphs
Definition: freetype.h:1076

Referenced by gxv_morx_subtable_type1_substitutionTable_validate().

◆ gxv_morx_subtable_type1_substitutionTable_load()

static void gxv_morx_subtable_type1_substitutionTable_load ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  gxvalid 
)
static

◆ gxv_morx_subtable_type1_substitutionTable_validate()

static void gxv_morx_subtable_type1_substitutionTable_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  gxvalid 
)
static

Definition at line 204 of file gxvmorx1.c.

207 {
208 FT_Bytes p = table;
209 FT_UShort i;
210
213
214
215 /* TODO: calculate offset/length for each lookupTables */
219
220 for ( i = 0; i < optdata->substitutionTable_num_lookupTables; i++ )
221 {
223
224
225 GXV_LIMIT_CHECK( 4 );
227
229 }
230
231 /* TODO: overlapping of lookupTables in substitutionTable */
232 }
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
unsigned long FT_ULong
Definition: fttypes.h:253
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
gxv_LookupTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvcommn.c:755
@ GXV_LOOKUPVALUE_UNSIGNED
Definition: gxvcommn.h:100
static void gxv_morx_subtable_type1_LookupValue_validate(FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
Definition: gxvmorx1.c:161
static GXV_LookupValueDesc gxv_morx_subtable_type1_LookupFmt4_transit(FT_UShort relative_gindex, GXV_LookupValueCPtr base_value_p, FT_Bytes lookuptbl_limit, GXV_Validator gxvalid)
Definition: gxvmorx1.c:175
#define for
Definition: utility.h:88
GXV_Lookup_Fmt4_Transit_Func lookupfmt4_trans
Definition: gxvcommn.h:248
GXV_Lookup_Value_Validate_Func lookupval_func
Definition: gxvcommn.h:247
GXV_LookupValue_SignSpec lookupval_sign
Definition: gxvcommn.h:246

Referenced by gxv_morx_subtable_type1_validate().

◆ gxv_morx_subtable_type1_subtable_setup()

static void gxv_morx_subtable_type1_subtable_setup ( FT_ULong  table_size,
FT_ULong  classTable,
FT_ULong  stateArray,
FT_ULong  entryTable,
FT_ULong classTable_length_p,
FT_ULong stateArray_length_p,
FT_ULong entryTable_length_p,
GXV_Validator  gxvalid 
)
static

Definition at line 73 of file gxvmorx1.c.

81 {
82 FT_ULong o[4];
83 FT_ULong *l[4];
84 FT_ULong buff[5];
85
88
89
90 o[0] = classTable;
91 o[1] = stateArray;
92 o[2] = entryTable;
93 o[3] = optdata->substitutionTable;
94 l[0] = classTable_length_p;
95 l[1] = stateArray_length_p;
96 l[2] = entryTable_length_p;
97 l[3] = &(optdata->substitutionTable_length);
98
100 }
r l[0]
Definition: byte_order.h:168
static unsigned char buff[32768]
Definition: fatten.c:17
gxv_set_length_by_ulong_offset(FT_ULong *offset, FT_ULong **length, FT_ULong *buff, FT_UInt nmemb, FT_ULong limit, GXV_Validator gxvalid)
Definition: gxvcommn.c:128
LOCAL int table_size
Definition: write.c:65

Referenced by gxv_morx_subtable_type1_validate().

◆ gxv_morx_subtable_type1_validate()

gxv_morx_subtable_type1_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  gxvalid 
)

Definition at line 241 of file gxvmorx1.c.

244 {
245 FT_Bytes p = table;
246
248
249
250 GXV_NAME_ENTER( "morx chain subtable type1 (Contextual Glyph Subst)" );
251
253
255
256 gxvalid->xstatetable.optdata =
257 &st_rec;
266
267 gxv_XStateTable_validate( p, limit, gxvalid );
268
270 table + st_rec.substitutionTable,
272 gxvalid );
273
274 GXV_EXIT;
275 }
gxv_XStateTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvcommn.c:1554
#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_MORX_SUBTABLE_TYPE1_HEADER_SIZE
Definition: gxvmorx1.c:52
static void gxv_morx_subtable_type1_entry_validate(FT_UShort state, FT_UShort flags, GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvmorx1.c:104
static void gxv_morx_subtable_type1_subtable_setup(FT_ULong table_size, FT_ULong classTable, FT_ULong stateArray, FT_ULong entryTable, FT_ULong *classTable_length_p, FT_ULong *stateArray_length_p, FT_ULong *entryTable_length_p, GXV_Validator gxvalid)
Definition: gxvmorx1.c:73
static void gxv_morx_subtable_type1_substitutionTable_load(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvmorx1.c:57
static void gxv_morx_subtable_type1_substitutionTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvmorx1.c:204
GXV_XStateTable_OptData_Load_Func optdata_load_func
Definition: gxvcommn.h:227
GXV_XStateTable_Entry_Validate_Func entry_validate_func
Definition: gxvcommn.h:226
GXV_XStateTable_Subtable_Setup_Func subtable_setup_func
Definition: gxvcommn.h:225

Referenced by gxv_morx_subtables_validate().