Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Classes | Macros | Typedefs | Functions
otvcommn.h File Reference
#include <ft2build.h>
#include "otvalid.h"

Go to the source code of this file.

Classes

struct  OTV_ValidatorRec_
 

Macros

#define FT_INVALID_(_prefix, _error)   ft_validator_error( valid->root, _prefix ## _error )
 
#define OTV_OPTIONAL_TABLE(_table)
 
#define OTV_OPTIONAL_OFFSET(_offset)
 
#define OTV_LIMIT_CHECK(_count)
 
#define OTV_SIZE_CHECK(_size)
 
#define OTV_NAME_(x)   #x
 
#define OTV_NAME(x)   OTV_NAME_(x)
 
#define OTV_FUNC_(x)   x##Func
 
#define OTV_FUNC(x)   OTV_FUNC_(x)
 
#define OTV_NEST1(x)
 
#define OTV_NEST2(x, y)
 
#define OTV_NEST3(x, y, z)
 
#define OTV_INIT   do { } while ( 0 )
 
#define OTV_ENTER   do { } while ( 0 )
 
#define OTV_NAME_ENTER(name)   do { } while ( 0 )
 
#define OTV_EXIT   do { } while ( 0 )
 
#define OTV_TRACE(s)   do { } while ( 0 )
 
#define OTV_RUN   valid->func[0]
 
#define ChainPosClassSetFunc   otv_x_Ox
 
#define ChainPosRuleSetFunc   otv_x_Ox
 
#define ChainSubClassSetFunc   otv_x_Ox
 
#define ChainSubRuleSetFunc   otv_x_Ox
 
#define JstfLangSysFunc   otv_x_Ox
 
#define JstfMaxFunc   otv_x_Ox
 
#define LigGlyphFunc   otv_x_Ox
 
#define LigatureArrayFunc   otv_x_Ox
 
#define LigatureSetFunc   otv_x_Ox
 
#define PosClassSetFunc   otv_x_Ox
 
#define PosRuleSetFunc   otv_x_Ox
 
#define SubClassSetFunc   otv_x_Ox
 
#define SubRuleSetFunc   otv_x_Ox
 
#define AlternateSubstFormat1Func   otv_u_C_x_Ox
 
#define ChainContextPosFormat1Func   otv_u_C_x_Ox
 
#define ChainContextSubstFormat1Func   otv_u_C_x_Ox
 
#define ContextPosFormat1Func   otv_u_C_x_Ox
 
#define ContextSubstFormat1Func   otv_u_C_x_Ox
 
#define LigatureSubstFormat1Func   otv_u_C_x_Ox
 
#define MultipleSubstFormat1Func   otv_u_C_x_Ox
 
#define AlternateSetFunc   otv_x_ux
 
#define AttachPointFunc   otv_x_ux
 
#define ExtenderGlyphFunc   otv_x_ux
 
#define JstfGPOSModListFunc   otv_x_ux
 
#define JstfGSUBModListFunc   otv_x_ux
 
#define SequenceFunc   otv_x_ux
 
#define PosClassRuleFunc   otv_x_y_ux_sy
 
#define PosRuleFunc   otv_x_y_ux_sy
 
#define SubClassRuleFunc   otv_x_y_ux_sy
 
#define SubRuleFunc   otv_x_y_ux_sy
 
#define ChainPosClassRuleFunc   otv_x_ux_y_uy_z_uz_p_sp
 
#define ChainPosRuleFunc   otv_x_ux_y_uy_z_uz_p_sp
 
#define ChainSubClassRuleFunc   otv_x_ux_y_uy_z_uz_p_sp
 
#define ChainSubRuleFunc   otv_x_ux_y_uy_z_uz_p_sp
 
#define ContextPosFormat2Func   otv_u_O_O_x_Onx
 
#define ContextSubstFormat2Func   otv_u_O_O_x_Onx
 
#define ContextPosFormat3Func   otv_u_x_y_Ox_sy
 
#define ContextSubstFormat3Func   otv_u_x_y_Ox_sy
 
#define ChainContextPosFormat2Func   otv_u_O_O_O_O_x_Onx
 
#define ChainContextSubstFormat2Func   otv_u_O_O_O_O_x_Onx
 
#define ChainContextPosFormat3Func   otv_u_x_Ox_y_Oy_z_Oz_p_sp
 
#define ChainContextSubstFormat3Func   otv_u_x_Ox_y_Oy_z_Oz_p_sp
 

Typedefs

typedef typedefFT_BEGIN_HEADER struct OTV_ValidatorRec_OTV_Validator
 
typedef void(* OTV_Validate_Func) (FT_Bytes table, OTV_Validator valid)
 
typedef struct OTV_ValidatorRec_ OTV_ValidatorRec
 

Functions

 otv_Coverage_validate (FT_Bytes table, OTV_Validator valid, FT_Int expected_count)
 
 otv_Coverage_get_first (FT_Bytes table)
 
 otv_Coverage_get_last (FT_Bytes table)
 
 otv_Coverage_get_count (FT_Bytes table)
 
 otv_ClassDef_validate (FT_Bytes table, OTV_Validator valid)
 
 otv_Device_validate (FT_Bytes table, OTV_Validator valid)
 
 otv_Lookup_validate (FT_Bytes table, OTV_Validator valid)
 
 otv_LookupList_validate (FT_Bytes table, OTV_Validator valid)
 
 otv_Feature_validate (FT_Bytes table, OTV_Validator valid)
 
 otv_FeatureList_validate (FT_Bytes table, FT_Bytes lookups, OTV_Validator valid)
 
 otv_LangSys_validate (FT_Bytes table, OTV_Validator valid)
 
 otv_Script_validate (FT_Bytes table, OTV_Validator valid)
 
 otv_ScriptList_validate (FT_Bytes table, FT_Bytes features, OTV_Validator valid)
 
 otv_x_Ox (FT_Bytes table, OTV_Validator valid)
 
 otv_u_C_x_Ox (FT_Bytes table, OTV_Validator valid)
 
 otv_x_ux (FT_Bytes table, OTV_Validator valid)
 
 otv_x_y_ux_sy (FT_Bytes table, OTV_Validator valid)
 
 otv_x_ux_y_uy_z_uz_p_sp (FT_Bytes table, OTV_Validator valid)
 
 otv_u_O_O_x_Onx (FT_Bytes table, OTV_Validator valid)
 
 otv_u_x_y_Ox_sy (FT_Bytes table, OTV_Validator valid)
 
 otv_u_O_O_O_O_x_Onx (FT_Bytes table, OTV_Validator valid)
 
 otv_u_x_Ox_y_Oy_z_Oz_p_sp (FT_Bytes table, OTV_Validator valid)
 
 otv_GSUBGPOS_get_Lookup_count (FT_Bytes table)
 
 otv_GSUBGPOS_have_MarkAttachmentType_flag (FT_Bytes table)
 

Macro Definition Documentation

◆ AlternateSetFunc

#define AlternateSetFunc   otv_x_ux

Definition at line 366 of file otvcommn.h.

◆ AlternateSubstFormat1Func

#define AlternateSubstFormat1Func   otv_u_C_x_Ox

Definition at line 354 of file otvcommn.h.

◆ AttachPointFunc

#define AttachPointFunc   otv_x_ux

Definition at line 367 of file otvcommn.h.

◆ ChainContextPosFormat1Func

#define ChainContextPosFormat1Func   otv_u_C_x_Ox

Definition at line 355 of file otvcommn.h.

◆ ChainContextPosFormat2Func

#define ChainContextPosFormat2Func   otv_u_O_O_O_O_x_Onx

Definition at line 409 of file otvcommn.h.

◆ ChainContextPosFormat3Func

#define ChainContextPosFormat3Func   otv_u_x_Ox_y_Oy_z_Oz_p_sp

Definition at line 416 of file otvcommn.h.

◆ ChainContextSubstFormat1Func

#define ChainContextSubstFormat1Func   otv_u_C_x_Ox

Definition at line 356 of file otvcommn.h.

◆ ChainContextSubstFormat2Func

#define ChainContextSubstFormat2Func   otv_u_O_O_O_O_x_Onx

Definition at line 410 of file otvcommn.h.

◆ ChainContextSubstFormat3Func

#define ChainContextSubstFormat3Func   otv_u_x_Ox_y_Oy_z_Oz_p_sp

Definition at line 417 of file otvcommn.h.

◆ ChainPosClassRuleFunc

#define ChainPosClassRuleFunc   otv_x_ux_y_uy_z_uz_p_sp

Definition at line 386 of file otvcommn.h.

◆ ChainPosClassSetFunc

#define ChainPosClassSetFunc   otv_x_Ox

Definition at line 336 of file otvcommn.h.

◆ ChainPosRuleFunc

#define ChainPosRuleFunc   otv_x_ux_y_uy_z_uz_p_sp

Definition at line 387 of file otvcommn.h.

◆ ChainPosRuleSetFunc

#define ChainPosRuleSetFunc   otv_x_Ox

Definition at line 337 of file otvcommn.h.

◆ ChainSubClassRuleFunc

#define ChainSubClassRuleFunc   otv_x_ux_y_uy_z_uz_p_sp

Definition at line 388 of file otvcommn.h.

◆ ChainSubClassSetFunc

#define ChainSubClassSetFunc   otv_x_Ox

Definition at line 338 of file otvcommn.h.

◆ ChainSubRuleFunc

#define ChainSubRuleFunc   otv_x_ux_y_uy_z_uz_p_sp

Definition at line 389 of file otvcommn.h.

◆ ChainSubRuleSetFunc

#define ChainSubRuleSetFunc   otv_x_Ox

Definition at line 339 of file otvcommn.h.

◆ ContextPosFormat1Func

#define ContextPosFormat1Func   otv_u_C_x_Ox

Definition at line 357 of file otvcommn.h.

◆ ContextPosFormat2Func

#define ContextPosFormat2Func   otv_u_O_O_x_Onx

Definition at line 395 of file otvcommn.h.

◆ ContextPosFormat3Func

#define ContextPosFormat3Func   otv_u_x_y_Ox_sy

Definition at line 402 of file otvcommn.h.

◆ ContextSubstFormat1Func

#define ContextSubstFormat1Func   otv_u_C_x_Ox

Definition at line 358 of file otvcommn.h.

◆ ContextSubstFormat2Func

#define ContextSubstFormat2Func   otv_u_O_O_x_Onx

Definition at line 396 of file otvcommn.h.

◆ ContextSubstFormat3Func

#define ContextSubstFormat3Func   otv_u_x_y_Ox_sy

Definition at line 403 of file otvcommn.h.

◆ ExtenderGlyphFunc

#define ExtenderGlyphFunc   otv_x_ux

Definition at line 368 of file otvcommn.h.

◆ FT_INVALID_

#define FT_INVALID_ (   _prefix,
  _error 
)    ft_validator_error( valid->root, _prefix ## _error )

Definition at line 70 of file otvcommn.h.

◆ JstfGPOSModListFunc

#define JstfGPOSModListFunc   otv_x_ux

Definition at line 369 of file otvcommn.h.

◆ JstfGSUBModListFunc

#define JstfGSUBModListFunc   otv_x_ux

Definition at line 370 of file otvcommn.h.

◆ JstfLangSysFunc

#define JstfLangSysFunc   otv_x_Ox

Definition at line 340 of file otvcommn.h.

◆ JstfMaxFunc

#define JstfMaxFunc   otv_x_Ox

Definition at line 341 of file otvcommn.h.

◆ LigatureArrayFunc

#define LigatureArrayFunc   otv_x_Ox

Definition at line 343 of file otvcommn.h.

◆ LigatureSetFunc

#define LigatureSetFunc   otv_x_Ox

Definition at line 344 of file otvcommn.h.

◆ LigatureSubstFormat1Func

#define LigatureSubstFormat1Func   otv_u_C_x_Ox

Definition at line 359 of file otvcommn.h.

◆ LigGlyphFunc

#define LigGlyphFunc   otv_x_Ox

Definition at line 342 of file otvcommn.h.

◆ MultipleSubstFormat1Func

#define MultipleSubstFormat1Func   otv_u_C_x_Ox

Definition at line 360 of file otvcommn.h.

◆ OTV_ENTER

#define OTV_ENTER   do { } while ( 0 )

◆ OTV_EXIT

#define OTV_EXIT   do { } while ( 0 )

◆ OTV_FUNC

#define OTV_FUNC (   x)    OTV_FUNC_(x)

Definition at line 116 of file otvcommn.h.

◆ OTV_FUNC_

#define OTV_FUNC_ (   x)    x##Func

Definition at line 115 of file otvcommn.h.

◆ OTV_INIT

#define OTV_INIT   do { } while ( 0 )

◆ OTV_LIMIT_CHECK

#define OTV_LIMIT_CHECK (   _count)

◆ OTV_NAME

#define OTV_NAME (   x)    OTV_NAME_(x)

Definition at line 113 of file otvcommn.h.

◆ OTV_NAME_

#define OTV_NAME_ (   x)    #x

Definition at line 112 of file otvcommn.h.

◆ OTV_NAME_ENTER

#define OTV_NAME_ENTER (   name)    do { } while ( 0 )

◆ OTV_NEST1

#define OTV_NEST1 (   x)
Value:
FT_BEGIN_STMNT \
valid->nesting_level = 0; \
valid->func[0] = OTV_FUNC( x ); \
FT_END_STMNT
GLint GLint GLint GLint GLint x
#define OTV_FUNC(x)
Definition: otvcommn.h:116

Definition at line 174 of file otvcommn.h.

◆ OTV_NEST2

#define OTV_NEST2 (   x,
  y 
)
Value:
FT_BEGIN_STMNT \
valid->nesting_level = 0; \
valid->func[0] = OTV_FUNC( x ); \
valid->func[1] = OTV_FUNC( y ); \
FT_END_STMNT
GLint GLint GLint GLint GLint GLint y
GLint GLint GLint GLint GLint x
#define OTV_FUNC(x)
Definition: otvcommn.h:116

Definition at line 180 of file otvcommn.h.

Referenced by otv_GDEF_validate().

◆ OTV_NEST3

#define OTV_NEST3 (   x,
  y,
  z 
)
Value:
FT_BEGIN_STMNT \
valid->nesting_level = 0; \
valid->func[0] = OTV_FUNC( x ); \
valid->func[1] = OTV_FUNC( y ); \
valid->func[2] = OTV_FUNC( z ); \
FT_END_STMNT
GLint GLint GLint GLint GLint GLint y
GLint GLint GLint GLint GLint x
GLdouble GLdouble z
#define OTV_FUNC(x)
Definition: otvcommn.h:116

Definition at line 187 of file otvcommn.h.

Referenced by otv_GDEF_validate().

◆ OTV_OPTIONAL_OFFSET

#define OTV_OPTIONAL_OFFSET (   _offset)
Value:
FT_BEGIN_STMNT \
_offset ## _p = p; \
_offset = FT_NEXT_USHORT( p ); \
FT_END_STMNT
GLfloat GLfloat p
#define FT_NEXT_USHORT(buffer)
Definition: ftstream.h:226

Definition at line 76 of file otvcommn.h.

Referenced by otv_BASE_validate(), and otv_GDEF_validate().

◆ OTV_OPTIONAL_TABLE

#define OTV_OPTIONAL_TABLE (   _table)
Value:
FT_UShort _table; \
FT_Bytes _table ## _p
unsigned short FT_UShort
Definition: fttypes.h:205

Definition at line 73 of file otvcommn.h.

Referenced by otv_BASE_validate(), and otv_GDEF_validate().

◆ OTV_RUN

#define OTV_RUN   valid->func[0]

Definition at line 205 of file otvcommn.h.

Referenced by otv_GDEF_validate().

◆ OTV_SIZE_CHECK

#define OTV_SIZE_CHECK (   _size)
Value:
if ( _size > 0 && _size < table_size ) \
{ \
if ( valid->root->level == FT_VALIDATE_PARANOID ) \
FT_INVALID_OFFSET; \
else \
{ \
/* strip off `const' */ \
FT_Byte* pp = (FT_Byte*)_size ## _p; \
FT_TRACE3(( "\n" \
"Invalid offset to optional table `%s'" \
" set to zero.\n" \
"\n", #_size )); \
\
/* always assume 16bit entities */ \
_size = pp[0] = pp[1] = 0; \
} \
} \
FT_END_STMNT
unsigned char FT_Byte
Definition: fttypes.h:150
if(!abbox) return FT_THROW(Invalid_Argument)
#define FT_TRACE3(varformat)
Definition: ftdebug.h:160

Definition at line 88 of file otvcommn.h.

Referenced by otv_BASE_validate(), and otv_GDEF_validate().

◆ OTV_TRACE

#define OTV_TRACE (   s)    do { } while ( 0 )

◆ PosClassRuleFunc

#define PosClassRuleFunc   otv_x_y_ux_sy

Definition at line 377 of file otvcommn.h.

◆ PosClassSetFunc

#define PosClassSetFunc   otv_x_Ox

Definition at line 345 of file otvcommn.h.

◆ PosRuleFunc

#define PosRuleFunc   otv_x_y_ux_sy

Definition at line 378 of file otvcommn.h.

◆ PosRuleSetFunc

#define PosRuleSetFunc   otv_x_Ox

Definition at line 346 of file otvcommn.h.

◆ SequenceFunc

#define SequenceFunc   otv_x_ux

Definition at line 371 of file otvcommn.h.

◆ SubClassRuleFunc

#define SubClassRuleFunc   otv_x_y_ux_sy

Definition at line 379 of file otvcommn.h.

◆ SubClassSetFunc

#define SubClassSetFunc   otv_x_Ox

Definition at line 347 of file otvcommn.h.

◆ SubRuleFunc

#define SubRuleFunc   otv_x_y_ux_sy

Definition at line 380 of file otvcommn.h.

◆ SubRuleSetFunc

#define SubRuleSetFunc   otv_x_Ox

Definition at line 348 of file otvcommn.h.

Typedef Documentation

◆ OTV_Validate_Func

typedef void(* OTV_Validate_Func) (FT_Bytes table, OTV_Validator valid)

Definition at line 41 of file otvcommn.h.

◆ OTV_Validator

typedef typedefFT_BEGIN_HEADER struct OTV_ValidatorRec_* OTV_Validator

Definition at line 39 of file otvcommn.h.

◆ OTV_ValidatorRec

Function Documentation

◆ otv_ClassDef_validate()

otv_ClassDef_validate ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_Coverage_get_count()

otv_Coverage_get_count ( FT_Bytes  table)

Definition at line 175 of file otvcommn.c.

References FT_LOCAL_DEF, and FT_NEXT_USHORT.

◆ otv_Coverage_get_first()

otv_Coverage_get_first ( FT_Bytes  table)

Definition at line 134 of file otvcommn.c.

References FT_LOCAL_DEF, and FT_NEXT_USHORT.

◆ otv_Coverage_get_last()

otv_Coverage_get_last ( FT_Bytes  table)

Definition at line 146 of file otvcommn.c.

References FT_LOCAL_DEF, and FT_NEXT_USHORT.

◆ otv_Coverage_validate()

otv_Coverage_validate ( FT_Bytes  table,
OTV_Validator  valid,
FT_Int  expected_count 
)

◆ otv_Device_validate()

otv_Device_validate ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_Feature_validate()

otv_Feature_validate ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_FeatureList_validate()

otv_FeatureList_validate ( FT_Bytes  table,
FT_Bytes  lookups,
OTV_Validator  valid 
)

Definition at line 463 of file otvcommn.c.

References FT_NEXT_USHORT, OTV_LIMIT_CHECK, OTV_NAME_ENTER, and OTV_TRACE.

◆ otv_GSUBGPOS_get_Lookup_count()

otv_GSUBGPOS_get_Lookup_count ( FT_Bytes  table)

Definition at line 1037 of file otvcommn.c.

Referenced by otv_JSTF_validate().

◆ otv_GSUBGPOS_have_MarkAttachmentType_flag()

otv_GSUBGPOS_have_MarkAttachmentType_flag ( FT_Bytes  table)

Definition at line 1047 of file otvcommn.c.

References FT_NEXT_USHORT.

Referenced by otv_GDEF_validate().

◆ otv_LangSys_validate()

otv_LangSys_validate ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_Lookup_validate()

otv_Lookup_validate ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_LookupList_validate()

otv_LookupList_validate ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_Script_validate()

otv_Script_validate ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_ScriptList_validate()

otv_ScriptList_validate ( FT_Bytes  table,
FT_Bytes  features,
OTV_Validator  valid 
)

Definition at line 584 of file otvcommn.c.

References FT_NEXT_USHORT, OTV_LIMIT_CHECK, OTV_NAME_ENTER, and OTV_TRACE.

◆ otv_u_C_x_Ox()

otv_u_C_x_Ox ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_u_O_O_O_O_x_Onx()

otv_u_O_O_O_O_x_Onx ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_u_O_O_x_Onx()

otv_u_O_O_x_Onx ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_u_x_Ox_y_Oy_z_Oz_p_sp()

otv_u_x_Ox_y_Oy_z_Oz_p_sp ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_u_x_y_Ox_sy()

otv_u_x_y_Ox_sy ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_x_Ox()

otv_x_Ox ( FT_Bytes  table,
OTV_Validator  valid 
)

Definition at line 642 of file otvcommn.c.

References FT_LOCAL_DEF, FT_NEXT_USHORT, OTV_ENTER, OTV_EXIT, OTV_LIMIT_CHECK, and OTV_TRACE.

◆ otv_x_ux()

otv_x_ux ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_x_ux_y_uy_z_uz_p_sp()

otv_x_ux_y_uy_z_uz_p_sp ( FT_Bytes  table,
OTV_Validator  valid 
)

◆ otv_x_y_ux_sy()

otv_x_y_ux_sy ( FT_Bytes  table,
OTV_Validator  valid 
)