ReactOS  0.4.15-dev-2534-geba00d1
gxvjust.c File Reference
#include "gxvalid.h"
#include "gxvcommn.h"
Include dependency graph for gxvjust.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GXV_just_DataRec_
 

Macros

#define FT_COMPONENT   trace_gxvjust
 
#define GXV_JUST_DATA(a)   GXV_TABLE_DATA( just, a )
 

Typedefs

typedef struct GXV_just_DataRec_ GXV_just_DataRec
 
typedef struct GXV_just_DataRec_GXV_just_Data
 

Functions

static void gxv_just_check_max_gid (FT_UShort gid, const FT_String *msg_tag, GXV_Validator gxvalid)
 
static void gxv_just_wdp_entry_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_wdc_entry_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_widthDeltaClusters_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_actSubrecord_type0_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_actSubrecord_type1_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_actSubrecord_type2_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_actSubrecord_type4_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_actSubrecord_type5_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_actSubrecord_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_pcActionRecord_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_pcTable_LookupValue_entry_validate (FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
 
static void gxv_just_pcLookupTable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_postcompTable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_classTable_entry_validate (FT_Byte state, FT_UShort flags, GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_justClassTable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_wdcTable_LookupValue_validate (FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
 
static void gxv_just_justData_lookuptable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
static void gxv_just_justData_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
 
 gxv_just_validate (FT_Bytes table, FT_Face face, FT_Validator ftvalid)
 

Macro Definition Documentation

◆ FT_COMPONENT

#define FT_COMPONENT   trace_gxvjust

Definition at line 41 of file gxvjust.c.

◆ GXV_JUST_DATA

#define GXV_JUST_DATA (   a)    GXV_TABLE_DATA( just, a )

Definition at line 66 of file gxvjust.c.

Typedef Documentation

◆ GXV_just_Data

◆ GXV_just_DataRec

Function Documentation

◆ gxv_just_actSubrecord_type0_validate()

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

Definition at line 178 of file gxvjust.c.

181  {
182  FT_Bytes p = table;
183 
184  FT_Fixed lowerLimit;
185  FT_Fixed upperLimit;
186 #ifdef GXV_LOAD_UNUSED_VARS
188 #endif
189  FT_UShort decomposedCount;
190 
191  FT_UInt i;
192 
193 
194  GXV_LIMIT_CHECK( 4 + 4 + 2 + 2 );
195  lowerLimit = FT_NEXT_LONG( p );
196  upperLimit = FT_NEXT_LONG( p );
197 #ifdef GXV_LOAD_UNUSED_VARS
198  order = FT_NEXT_USHORT( p );
199 #else
200  p += 2;
201 #endif
202  decomposedCount = FT_NEXT_USHORT( p );
203 
204  if ( lowerLimit >= upperLimit )
205  {
206  GXV_TRACE(( "just table includes invalid range spec:"
207  " lowerLimit(%d) > upperLimit(%d)\n" ));
209  }
210 
211  for ( i = 0; i < decomposedCount; i++ )
212  {
214 
215 
216  GXV_LIMIT_CHECK( 2 );
217  glyphs = FT_NEXT_USHORT( p );
218  gxv_just_check_max_gid( glyphs, "type0:glyphs", gxvalid );
219  }
220 
221  gxvalid->subtable_length = (FT_ULong)( p - table );
222  }
static void gxv_just_check_max_gid(FT_UShort gid, const FT_String *msg_tag, GXV_Validator gxvalid)
Definition: gxvjust.c:71
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
unsigned long FT_ULong
Definition: fttypes.h:253
#define FT_NEXT_LONG(buffer)
Definition: ftstream.h:235
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
static UINT UINT LPWORD glyphs
Definition: font.c:44
#define GXV_SET_ERR_IF_PARANOID(err)
Definition: gxvcommn.h:66
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
signed long FT_Fixed
Definition: fttypes.h:288
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
unsigned int FT_UInt
Definition: fttypes.h:231
#define FT_INVALID_DATA
Definition: ftvalid.h:150
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_actSubrecord_validate().

◆ gxv_just_actSubrecord_type1_validate()

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

Definition at line 226 of file gxvjust.c.

229  {
230  FT_Bytes p = table;
231  FT_UShort addGlyph;
232 
233 
234  GXV_LIMIT_CHECK( 2 );
235  addGlyph = FT_NEXT_USHORT( p );
236 
237  gxv_just_check_max_gid( addGlyph, "type1:addGlyph", gxvalid );
238 
239  gxvalid->subtable_length = (FT_ULong)( p - table );
240  }
static void gxv_just_check_max_gid(FT_UShort gid, const FT_String *msg_tag, GXV_Validator gxvalid)
Definition: gxvjust.c:71
unsigned long FT_ULong
Definition: fttypes.h:253
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_actSubrecord_validate().

◆ gxv_just_actSubrecord_type2_validate()

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

Definition at line 244 of file gxvjust.c.

247  {
248  FT_Bytes p = table;
249 #ifdef GXV_LOAD_UNUSED_VARS
250  FT_Fixed substThreshhold; /* Apple misspelled "Threshhold" */
251 #endif
252  FT_UShort addGlyph;
253  FT_UShort substGlyph;
254 
255 
256  GXV_LIMIT_CHECK( 4 + 2 + 2 );
257 #ifdef GXV_LOAD_UNUSED_VARS
258  substThreshhold = FT_NEXT_ULONG( p );
259 #else
260  p += 4;
261 #endif
262  addGlyph = FT_NEXT_USHORT( p );
263  substGlyph = FT_NEXT_USHORT( p );
264 
265  if ( addGlyph != 0xFFFF )
266  gxv_just_check_max_gid( addGlyph, "type2:addGlyph", gxvalid );
267 
268  gxv_just_check_max_gid( substGlyph, "type2:substGlyph", gxvalid );
269 
270  gxvalid->subtable_length = (FT_ULong)( p - table );
271  }
static void gxv_just_check_max_gid(FT_UShort gid, const FT_String *msg_tag, GXV_Validator gxvalid)
Definition: gxvjust.c:71
unsigned long FT_ULong
Definition: fttypes.h:253
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
signed long FT_Fixed
Definition: fttypes.h:288
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_actSubrecord_validate().

◆ gxv_just_actSubrecord_type4_validate()

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

Definition at line 275 of file gxvjust.c.

278  {
279  FT_Bytes p = table;
280  FT_ULong variantsAxis;
281  FT_Fixed minimumLimit;
282  FT_Fixed noStretchValue;
283  FT_Fixed maximumLimit;
284 
285 
286  GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 );
287  variantsAxis = FT_NEXT_ULONG( p );
288  minimumLimit = FT_NEXT_LONG( p );
289  noStretchValue = FT_NEXT_LONG( p );
290  maximumLimit = FT_NEXT_LONG( p );
291 
292  gxvalid->subtable_length = (FT_ULong)( p - table );
293 
294  if ( variantsAxis != 0x64756374L ) /* 'duct' */
295  GXV_TRACE(( "variantsAxis 0x%08x is non default value",
296  variantsAxis ));
297 
298  if ( minimumLimit > noStretchValue )
299  GXV_TRACE(( "type4:minimumLimit 0x%08x > noStretchValue 0x%08x\n",
300  minimumLimit, noStretchValue ));
301  else if ( noStretchValue > maximumLimit )
302  GXV_TRACE(( "type4:noStretchValue 0x%08x > maximumLimit 0x%08x\n",
303  noStretchValue, maximumLimit ));
304  else if ( !IS_PARANOID_VALIDATION )
305  return;
306 
308  }
unsigned long FT_ULong
Definition: fttypes.h:253
#define FT_NEXT_LONG(buffer)
Definition: ftstream.h:235
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
#define IS_PARANOID_VALIDATION
Definition: gxvcommn.h:65
signed long FT_Fixed
Definition: fttypes.h:288
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
#define FT_INVALID_DATA
Definition: ftvalid.h:150
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_actSubrecord_validate().

◆ gxv_just_actSubrecord_type5_validate()

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

Definition at line 312 of file gxvjust.c.

315  {
316  FT_Bytes p = table;
318  FT_UShort glyph;
319 
320 
321  GXV_LIMIT_CHECK( 2 + 2 );
322  flags = FT_NEXT_USHORT( p );
323  glyph = FT_NEXT_USHORT( p );
324 
325  if ( flags )
326  GXV_TRACE(( "type5: nonzero value 0x%04x in unused flags\n",
327  flags ));
328  gxv_just_check_max_gid( glyph, "type5:glyph", gxvalid );
329 
330  gxvalid->subtable_length = (FT_ULong)( p - table );
331  }
static void gxv_just_check_max_gid(FT_UShort gid, const FT_String *msg_tag, GXV_Validator gxvalid)
Definition: gxvjust.c:71
unsigned long FT_ULong
Definition: fttypes.h:253
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
GLbitfield flags
Definition: glext.h:7161
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_actSubrecord_validate().

◆ gxv_just_actSubrecord_validate()

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

Definition at line 336 of file gxvjust.c.

339  {
340  FT_Bytes p = table;
341  FT_UShort actionClass;
342  FT_UShort actionType;
343  FT_ULong actionLength;
344 
345 
346  GXV_NAME_ENTER( "just actSubrecord" );
347 
348  GXV_LIMIT_CHECK( 2 + 2 + 4 );
349  actionClass = FT_NEXT_USHORT( p );
350  actionType = FT_NEXT_USHORT( p );
351  actionLength = FT_NEXT_ULONG( p );
352 
353  /* actionClass is related with justClass using 7bit only */
354  if ( ( actionClass & 0xFF80 ) != 0 )
356 
357  if ( actionType == 0 )
359  else if ( actionType == 1 )
361  else if ( actionType == 2 )
363  else if ( actionType == 3 )
364  ; /* Stretch glyph action: no actionData */
365  else if ( actionType == 4 )
367  else if ( actionType == 5 )
369  else
371 
372  gxvalid->subtable_length = actionLength;
373 
374  GXV_EXIT;
375  }
unsigned long FT_ULong
Definition: fttypes.h:253
static void gxv_just_actSubrecord_type4_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:275
#define GXV_NAME_ENTER(name)
Definition: gxvcommn.h:301
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
static void gxv_just_actSubrecord_type1_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:226
GLint limit
Definition: glext.h:10326
#define GXV_SET_ERR_IF_PARANOID(err)
Definition: gxvcommn.h:66
#define GXV_EXIT
Definition: gxvcommn.h:302
static void gxv_just_actSubrecord_type5_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:312
static void gxv_just_actSubrecord_type2_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:244
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
static void gxv_just_actSubrecord_type0_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:178
#define FT_INVALID_DATA
Definition: ftvalid.h:150
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_pcActionRecord_validate().

◆ gxv_just_check_max_gid()

static void gxv_just_check_max_gid ( FT_UShort  gid,
const FT_String msg_tag,
GXV_Validator  gxvalid 
)
static

Definition at line 71 of file gxvjust.c.

74  {
75  if ( gid < gxvalid->face->num_glyphs )
76  return;
77 
78  GXV_TRACE(( "just table includes too large %s"
79  " GID=%d > %d (in maxp)\n",
80  msg_tag, gid, gxvalid->face->num_glyphs ));
82  }
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
FT_Long num_glyphs
Definition: freetype.h:1076
#define GXV_SET_ERR_IF_PARANOID(err)
Definition: gxvcommn.h:66
#define FT_INVALID_GLYPH_ID
Definition: ftvalid.h:146
GLenum GLuint GLint GLenum face
Definition: glext.h:7025

Referenced by gxv_just_actSubrecord_type0_validate(), gxv_just_actSubrecord_type1_validate(), gxv_just_actSubrecord_type2_validate(), and gxv_just_actSubrecord_type5_validate().

◆ gxv_just_classTable_entry_validate()

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

Definition at line 464 of file gxvjust.c.

471  {
472 #ifdef GXV_LOAD_UNUSED_VARS
473  /* TODO: validate markClass & currentClass */
474  FT_UShort setMark;
475  FT_UShort dontAdvance;
476  FT_UShort markClass;
477  FT_UShort currentClass;
478 #endif
479 
480  FT_UNUSED( state );
481  FT_UNUSED( glyphOffset_p );
482  FT_UNUSED( table );
483  FT_UNUSED( limit );
484  FT_UNUSED( gxvalid );
485 
486 #ifndef GXV_LOAD_UNUSED_VARS
487  FT_UNUSED( flags );
488 #else
489  setMark = (FT_UShort)( ( flags >> 15 ) & 1 );
490  dontAdvance = (FT_UShort)( ( flags >> 14 ) & 1 );
491  markClass = (FT_UShort)( ( flags >> 7 ) & 0x7F );
492  currentClass = (FT_UShort)( flags & 0x7F );
493 #endif
494  }
GLint limit
Definition: glext.h:10326
GLbitfield flags
Definition: glext.h:7161
static int state
Definition: maze.c:121
unsigned short FT_UShort
Definition: fttypes.h:209
#define FT_UNUSED(arg)
Definition: ftconfig.h:101

Referenced by gxv_just_justClassTable_validate().

◆ gxv_just_justClassTable_validate()

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

Definition at line 498 of file gxvjust.c.

501  {
502  FT_Bytes p = table;
504  FT_UShort coverage;
505  FT_ULong subFeatureFlags;
506 
507 
508  GXV_NAME_ENTER( "just justClassTable" );
509 
510  GXV_LIMIT_CHECK( 2 + 2 + 4 );
511  length = FT_NEXT_USHORT( p );
512  coverage = FT_NEXT_USHORT( p );
513  subFeatureFlags = FT_NEXT_ULONG( p );
514 
515  GXV_TRACE(( " justClassTable: coverage = 0x%04x (%s) ", coverage ));
516  if ( ( coverage & 0x4000 ) == 0 )
517  GXV_TRACE(( "ascending\n" ));
518  else
519  GXV_TRACE(( "descending\n" ));
520 
521  if ( subFeatureFlags )
522  GXV_TRACE(( " justClassTable: nonzero value (0x%08x)"
523  " in unused subFeatureFlags\n", subFeatureFlags ));
524 
525  gxvalid->statetable.optdata = NULL;
526  gxvalid->statetable.optdata_load_func = NULL;
531 
532  gxv_StateTable_validate( p, table + length, gxvalid );
533 
534  /* subtable_length is set by gxv_LookupTable_validate() */
535 
536  GXV_EXIT;
537  }
unsigned long FT_ULong
Definition: fttypes.h:253
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
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
GXV_StateTable_Entry_Validate_Func entry_validate_func
Definition: gxvcommn.h:185
GXV_StateTable_OptData_Load_Func optdata_load_func
Definition: gxvcommn.h:186
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
GXV_StateTable_Subtable_Setup_Func subtable_setup_func
Definition: gxvcommn.h:184
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define GXV_EXIT
Definition: gxvcommn.h:302
static void gxv_just_classTable_entry_validate(FT_Byte state, FT_UShort flags, GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:464
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
GXV_StateTable_ValidatorRec statetable
Definition: gxvcommn.h:254
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
#define NULL
Definition: types.h:112
GXV_GlyphOffset_Format entry_glyphoffset_fmt
Definition: gxvcommn.h:181
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_justData_validate().

◆ gxv_just_justData_lookuptable_validate()

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

Definition at line 555 of file gxvjust.c.

558  {
559  FT_Bytes p = table;
560 
561 
562  GXV_JUST_DATA( wdc_offset_max ) = 0x0000;
563  GXV_JUST_DATA( wdc_offset_min ) = 0xFFFFU;
564 
567 
568  gxv_LookupTable_validate( p, limit, gxvalid );
569 
570  /* subtable_length is set by gxv_LookupTable_validate() */
571 
572  GXV_EXIT;
573  }
#define U(x)
Definition: wordpad.c:45
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
GXV_LookupValue_SignSpec lookupval_sign
Definition: gxvcommn.h:246
GLint limit
Definition: glext.h:10326
static void gxv_just_wdcTable_LookupValue_validate(FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
Definition: gxvjust.c:541
GXV_Lookup_Value_Validate_Func lookupval_func
Definition: gxvcommn.h:247
gxv_LookupTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvcommn.c:755
#define GXV_EXIT
Definition: gxvcommn.h:302
#define GXV_JUST_DATA(a)
Definition: gxvjust.c:66
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by gxv_just_justData_validate().

◆ gxv_just_justData_validate()

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

Definition at line 580 of file gxvjust.c.

583  {
584  /*
585  * following 3 offsets are measured from the start of `just'
586  * (which table points to), not justData
587  */
588  FT_UShort justClassTableOffset;
589  FT_UShort wdcTableOffset;
590  FT_UShort pcTableOffset;
591  FT_Bytes p = table;
592 
593  GXV_ODTECT( 4, odtect );
594 
595 
596  GXV_NAME_ENTER( "just justData" );
597 
598  GXV_ODTECT_INIT( odtect );
599  GXV_LIMIT_CHECK( 2 + 2 + 2 );
600  justClassTableOffset = FT_NEXT_USHORT( p );
601  wdcTableOffset = FT_NEXT_USHORT( p );
602  pcTableOffset = FT_NEXT_USHORT( p );
603 
604  GXV_TRACE(( " (justClassTableOffset = 0x%04x)\n", justClassTableOffset ));
605  GXV_TRACE(( " (wdcTableOffset = 0x%04x)\n", wdcTableOffset ));
606  GXV_TRACE(( " (pcTableOffset = 0x%04x)\n", pcTableOffset ));
607 
610  "just_LookupTable", odtect );
611 
612  if ( wdcTableOffset )
613  {
615  gxvalid->root->base + wdcTableOffset, limit, gxvalid );
616  gxv_odtect_add_range( gxvalid->root->base + wdcTableOffset,
617  gxvalid->subtable_length, "just_wdcTable", odtect );
618  }
619 
620  if ( pcTableOffset )
621  {
622  gxv_just_postcompTable_validate( gxvalid->root->base + pcTableOffset,
623  limit, gxvalid );
624  gxv_odtect_add_range( gxvalid->root->base + pcTableOffset,
625  gxvalid->subtable_length, "just_pcTable", odtect );
626  }
627 
628  if ( justClassTableOffset )
629  {
631  gxvalid->root->base + justClassTableOffset, limit, gxvalid );
632  gxv_odtect_add_range( gxvalid->root->base + justClassTableOffset,
633  gxvalid->subtable_length, "just_justClassTable",
634  odtect );
635  }
636 
637  gxv_odtect_validate( odtect, gxvalid );
638 
639  GXV_EXIT;
640  }
static void gxv_just_justClassTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:498
#define GXV_NAME_ENTER(name)
Definition: gxvcommn.h:301
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
#define GXV_ODTECT(n, odtect)
Definition: gxvcommn.h:562
GLint limit
Definition: glext.h:10326
gxv_odtect_validate(GXV_odtect_Range odtect, GXV_Validator gxvalid)
Definition: gxvcommn.c:1715
#define GXV_EXIT
Definition: gxvcommn.h:302
static void gxv_just_justData_lookuptable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:555
FT_Validator root
Definition: gxvcommn.h:239
static void gxv_just_widthDeltaClusters_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:151
#define GXV_ODTECT_INIT(odtect)
Definition: gxvcommn.h:567
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
static void gxv_just_postcompTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:442
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
FT_ULong subtable_length
Definition: gxvcommn.h:244
gxv_odtect_add_range(FT_Bytes start, FT_ULong length, const FT_String *name, GXV_odtect_Range odtect)
Definition: gxvcommn.c:1702
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_validate().

◆ gxv_just_pcActionRecord_validate()

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

Definition at line 379 of file gxvjust.c.

382  {
383  FT_Bytes p = table;
384  FT_ULong actionCount;
385  FT_ULong i;
386 
387 
388  GXV_LIMIT_CHECK( 4 );
389  actionCount = FT_NEXT_ULONG( p );
390  GXV_TRACE(( "actionCount = %d\n", actionCount ));
391 
392  for ( i = 0; i < actionCount; i++ )
393  {
395  p += gxvalid->subtable_length;
396  }
397 
398  gxvalid->subtable_length = (FT_ULong)( p - table );
399 
400  GXV_EXIT;
401  }
unsigned long FT_ULong
Definition: fttypes.h:253
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
GLint limit
Definition: glext.h:10326
static void gxv_just_actSubrecord_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:336
#define GXV_EXIT
Definition: gxvcommn.h:302
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
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
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_postcompTable_validate().

◆ gxv_just_pcLookupTable_validate()

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

Definition at line 419 of file gxvjust.c.

422  {
423  FT_Bytes p = table;
424 
425 
426  GXV_NAME_ENTER( "just pcLookupTable" );
427  GXV_JUST_DATA( pc_offset_max ) = 0x0000;
428  GXV_JUST_DATA( pc_offset_min ) = 0xFFFFU;
429 
432 
433  gxv_LookupTable_validate( p, limit, gxvalid );
434 
435  /* subtable_length is set by gxv_LookupTable_validate() */
436 
437  GXV_EXIT;
438  }
#define GXV_NAME_ENTER(name)
Definition: gxvcommn.h:301
static void gxv_just_pcTable_LookupValue_entry_validate(FT_UShort glyph, GXV_LookupValueCPtr value_p, GXV_Validator gxvalid)
Definition: gxvjust.c:405
#define U(x)
Definition: wordpad.c:45
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
GXV_LookupValue_SignSpec lookupval_sign
Definition: gxvcommn.h:246
GLint limit
Definition: glext.h:10326
GXV_Lookup_Value_Validate_Func lookupval_func
Definition: gxvcommn.h:247
gxv_LookupTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvcommn.c:755
#define GXV_EXIT
Definition: gxvcommn.h:302
#define GXV_JUST_DATA(a)
Definition: gxvjust.c:66
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by gxv_just_postcompTable_validate().

◆ gxv_just_pcTable_LookupValue_entry_validate()

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

Definition at line 405 of file gxvjust.c.

408  {
409  FT_UNUSED( glyph );
410 
411  if ( value_p->u > GXV_JUST_DATA( pc_offset_max ) )
412  GXV_JUST_DATA( pc_offset_max ) = value_p->u;
413  if ( value_p->u < GXV_JUST_DATA( pc_offset_max ) )
414  GXV_JUST_DATA( pc_offset_min ) = value_p->u;
415  }
#define GXV_JUST_DATA(a)
Definition: gxvjust.c:66
#define FT_UNUSED(arg)
Definition: ftconfig.h:101

Referenced by gxv_just_pcLookupTable_validate().

◆ gxv_just_postcompTable_validate()

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

Definition at line 442 of file gxvjust.c.

445  {
446  FT_Bytes p = table;
447 
448 
449  GXV_NAME_ENTER( "just postcompTable" );
450 
452  p += gxvalid->subtable_length;
453 
455  p += gxvalid->subtable_length;
456 
457  gxvalid->subtable_length = (FT_ULong)( p - table );
458 
459  GXV_EXIT;
460  }
static void gxv_just_pcLookupTable_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:419
unsigned long FT_ULong
Definition: fttypes.h:253
#define GXV_NAME_ENTER(name)
Definition: gxvcommn.h:301
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
GLint limit
Definition: glext.h:10326
#define GXV_EXIT
Definition: gxvcommn.h:302
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
static void gxv_just_pcActionRecord_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:379
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by gxv_just_justData_validate().

◆ gxv_just_validate()

gxv_just_validate ( FT_Bytes  table,
FT_Face  face,
FT_Validator  ftvalid 
)

Definition at line 644 of file gxvjust.c.

647  {
648  FT_Bytes p = table;
649  FT_Bytes limit = 0;
650 
651  GXV_ValidatorRec gxvalidrec;
652  GXV_Validator gxvalid = &gxvalidrec;
653  GXV_just_DataRec justrec;
654  GXV_just_Data just = &justrec;
655 
658  FT_UShort horizOffset;
659  FT_UShort vertOffset;
660 
661  GXV_ODTECT( 3, odtect );
662 
663 
664  GXV_ODTECT_INIT( odtect );
665 
666  gxvalid->root = ftvalid;
667  gxvalid->table_data = just;
668  gxvalid->face = face;
669 
670  FT_TRACE3(( "validating `just' table\n" ));
671  GXV_INIT;
672 
673  limit = gxvalid->root->limit;
674 
675  GXV_LIMIT_CHECK( 4 + 2 + 2 + 2 );
676  version = FT_NEXT_ULONG( p );
677  format = FT_NEXT_USHORT( p );
678  horizOffset = FT_NEXT_USHORT( p );
679  vertOffset = FT_NEXT_USHORT( p );
681  "just header", odtect );
682 
683 
684  /* Version 1.0 (always:2000) */
685  GXV_TRACE(( " (version = 0x%08x)\n", version ));
686  if ( version != 0x00010000UL )
688 
689  /* format 0 (always:2000) */
690  GXV_TRACE(( " (format = 0x%04x)\n", format ));
691  if ( format != 0x0000 )
693 
694  GXV_TRACE(( " (horizOffset = %d)\n", horizOffset ));
695  GXV_TRACE(( " (vertOffset = %d)\n", vertOffset ));
696 
697 
698  /* validate justData */
699  if ( 0 < horizOffset )
700  {
701  gxv_just_justData_validate( table + horizOffset, limit, gxvalid );
702  gxv_odtect_add_range( table + horizOffset, gxvalid->subtable_length,
703  "horizJustData", odtect );
704  }
705 
706  if ( 0 < vertOffset )
707  {
708  gxv_just_justData_validate( table + vertOffset, limit, gxvalid );
709  gxv_odtect_add_range( table + vertOffset, gxvalid->subtable_length,
710  "vertJustData", odtect );
711  }
712 
713  gxv_odtect_validate( odtect, gxvalid );
714 
715  FT_TRACE4(( "\n" ));
716  }
unsigned long FT_ULong
Definition: fttypes.h:253
#define FT_INVALID_FORMAT
Definition: ftvalid.h:142
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
#define GXV_ODTECT(n, odtect)
Definition: gxvcommn.h:562
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLint limit
Definition: glext.h:10326
gxv_odtect_validate(GXV_odtect_Range odtect, GXV_Validator gxvalid)
Definition: gxvcommn.c:1715
#define FT_TRACE4(varformat)
Definition: ftdebug.h:161
void * table_data
Definition: gxvcommn.h:242
static const WCHAR version[]
Definition: asmname.c:66
static void gxv_just_justData_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:580
FT_Validator root
Definition: gxvcommn.h:239
WORD face[3]
Definition: mesh.c:4747
#define GXV_ODTECT_INIT(odtect)
Definition: gxvcommn.h:567
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
#define FT_TRACE3(varformat)
Definition: ftdebug.h:160
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
FT_ULong subtable_length
Definition: gxvcommn.h:244
gxv_odtect_add_range(FT_Bytes start, FT_ULong length, const FT_String *name, GXV_odtect_Range odtect)
Definition: gxvcommn.c:1702
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_INIT
Definition: gxvcommn.h:300
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

◆ gxv_just_wdc_entry_validate()

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

Definition at line 129 of file gxvjust.c.

132  {
133  FT_Bytes p = table;
134  FT_ULong count, i;
135 
136 
137  GXV_LIMIT_CHECK( 4 );
138  count = FT_NEXT_ULONG( p );
139  for ( i = 0; i < count; i++ )
140  {
141  GXV_TRACE(( "validating wdc pair %d/%d\n", i + 1, count ));
142  gxv_just_wdp_entry_validate( p, limit, gxvalid );
143  p += gxvalid->subtable_length;
144  }
145 
146  gxvalid->subtable_length = (FT_ULong)( p - table );
147  }
unsigned long FT_ULong
Definition: fttypes.h:253
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
GLint limit
Definition: glext.h:10326
static void gxv_just_wdp_entry_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:86
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
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
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_widthDeltaClusters_validate().

◆ gxv_just_wdcTable_LookupValue_validate()

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

Definition at line 541 of file gxvjust.c.

544  {
545  FT_UNUSED( glyph );
546 
547  if ( value_p->u > GXV_JUST_DATA( wdc_offset_max ) )
548  GXV_JUST_DATA( wdc_offset_max ) = value_p->u;
549  if ( value_p->u < GXV_JUST_DATA( wdc_offset_min ) )
550  GXV_JUST_DATA( wdc_offset_min ) = value_p->u;
551  }
#define GXV_JUST_DATA(a)
Definition: gxvjust.c:66
#define FT_UNUSED(arg)
Definition: ftconfig.h:101

Referenced by gxv_just_justData_lookuptable_validate().

◆ gxv_just_wdp_entry_validate()

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

Definition at line 86 of file gxvjust.c.

89  {
90  FT_Bytes p = table;
91  FT_ULong justClass;
92 #ifdef GXV_LOAD_UNUSED_VARS
93  FT_Fixed beforeGrowLimit;
94  FT_Fixed beforeShrinkGrowLimit;
95  FT_Fixed afterGrowLimit;
96  FT_Fixed afterShrinkGrowLimit;
97  FT_UShort growFlags;
98  FT_UShort shrinkFlags;
99 #endif
100 
101 
102  GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 + 4 + 2 + 2 );
103  justClass = FT_NEXT_ULONG( p );
104 #ifndef GXV_LOAD_UNUSED_VARS
105  p += 4 + 4 + 4 + 4 + 2 + 2;
106 #else
107  beforeGrowLimit = FT_NEXT_ULONG( p );
108  beforeShrinkGrowLimit = FT_NEXT_ULONG( p );
109  afterGrowLimit = FT_NEXT_ULONG( p );
110  afterShrinkGrowLimit = FT_NEXT_ULONG( p );
111  growFlags = FT_NEXT_USHORT( p );
112  shrinkFlags = FT_NEXT_USHORT( p );
113 #endif
114 
115  /* According to Apple spec, only 7bits in justClass is used */
116  if ( ( justClass & 0xFFFFFF80UL ) != 0 )
117  {
118  GXV_TRACE(( "just table includes non-zero value"
119  " in unused justClass higher bits"
120  " of WidthDeltaPair" ));
122  }
123 
124  gxvalid->subtable_length = (FT_ULong)( p - table );
125  }
unsigned long FT_ULong
Definition: fttypes.h:253
#define GXV_TRACE(s)
Definition: gxvcommn.h:304
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
#define GXV_SET_ERR_IF_PARANOID(err)
Definition: gxvcommn.h:66
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226
signed long FT_Fixed
Definition: fttypes.h:288
#define FT_NEXT_ULONG(buffer)
Definition: ftstream.h:238
#define FT_INVALID_DATA
Definition: ftvalid.h:150
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902
unsigned short FT_UShort
Definition: fttypes.h:209
#define GXV_LIMIT_CHECK(_count)
Definition: gxvcommn.h:272

Referenced by gxv_just_wdc_entry_validate().

◆ gxv_just_widthDeltaClusters_validate()

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

Definition at line 151 of file gxvjust.c.

154  {
155  FT_Bytes p = table;
156  FT_Bytes wdc_end = table + GXV_JUST_DATA( wdc_offset_max );
157  FT_UInt i;
158 
159 
160  GXV_NAME_ENTER( "just justDeltaClusters" );
161 
162  if ( limit <= wdc_end )
164 
165  for ( i = 0; p <= wdc_end; i++ )
166  {
167  gxv_just_wdc_entry_validate( p, limit, gxvalid );
168  p += gxvalid->subtable_length;
169  }
170 
171  gxvalid->subtable_length = (FT_ULong)( p - table );
172 
173  GXV_EXIT;
174  }
unsigned long FT_ULong
Definition: fttypes.h:253
#define GXV_NAME_ENTER(name)
Definition: gxvcommn.h:301
GLenum GLsizei GLenum GLenum const GLvoid * table
Definition: glext.h:5644
GLint limit
Definition: glext.h:10326
#define GXV_EXIT
Definition: gxvcommn.h:302
#define GXV_JUST_DATA(a)
Definition: gxvjust.c:66
static void gxv_just_wdc_entry_validate(FT_Bytes table, FT_Bytes limit, GXV_Validator gxvalid)
Definition: gxvjust.c:129
const FT_Byte * FT_Bytes
Definition: fttypes.h:165
#define FT_INVALID_OFFSET
Definition: ftvalid.h:138
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
unsigned int FT_UInt
Definition: fttypes.h:231
FT_ULong subtable_length
Definition: gxvcommn.h:244
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by gxv_just_justData_validate().