gxvkern.c File Reference

#include "gxvalid.h"
#include "gxvcommn.h"

Go to the source code of this file.

Classes

struct  GXV_kern_DataRec_
struct  GXV_kern_fmt1_StateOptRec_
struct  GXV_kern_subtable_fmt2_DataRec_

Defines

#define FT_COMPONENT   trace_gxvkern
#define GXV_KERN_DATA(field)   GXV_TABLE_DATA( kern, field )
#define KERN_IS_CLASSIC(valid)   ( KERN_VERSION_CLASSIC == GXV_KERN_DATA( version ) )
#define KERN_IS_NEW(valid)   ( KERN_VERSION_NEW == GXV_KERN_DATA( version ) )
#define KERN_DIALECT(valid)   GXV_KERN_DATA( dialect_request )
#define KERN_ALLOWS_MS(valid)   ( KERN_DIALECT( valid ) & KERN_DIALECT_MS )
#define KERN_ALLOWS_APPLE(valid)   ( KERN_DIALECT( valid ) & KERN_DIALECT_APPLE )
#define GXV_KERN_HEADER_SIZE   ( KERN_IS_NEW( valid ) ? 8 : 4 )
#define GXV_KERN_SUBTABLE_HEADER_SIZE   ( KERN_IS_NEW( valid ) ? 8 : 6 )
#define GXV_KERN_FMT2_DATA(field)

Typedefs

typedef enum GXV_kern_Version_ GXV_kern_Version
typedef enum GXV_kern_Dialect_ GXV_kern_Dialect
typedef GXV_kern_DataRec_ GXV_kern_DataRec
typedef GXV_kern_DataRec_GXV_kern_Data
typedef GXV_kern_fmt1_StateOptRec_ GXV_kern_fmt1_StateOptRec
typedef GXV_kern_fmt1_StateOptRec_GXV_kern_fmt1_StateOptRecData
typedef enum GXV_kern_ClassSpec_ GXV_kern_ClassSpec
typedef GXV_kern_subtable_fmt2_DataRec_ GXV_kern_subtable_fmt2_DataRec
typedef GXV_kern_subtable_fmt2_DataRec_GXV_kern_subtable_fmt2_Data

Enumerations

enum  GXV_kern_Version_
enum  GXV_kern_Dialect_
enum  GXV_kern_ClassSpec_

Functions

static void gxv_kern_subtable_fmt0_pairs_validate (FT_Bytes table, FT_Bytes limit, FT_UShort nPairs, GXV_Validator valid)
static void gxv_kern_subtable_fmt0_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
static void gxv_kern_subtable_fmt1_valueTable_load (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
static void gxv_kern_subtable_fmt1_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 valid)
static void gxv_kern_subtable_fmt1_entry_validate (FT_Byte state, FT_UShort flags, GXV_StateTable_GlyphOffsetCPtr glyphOffset_p, FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
static void gxv_kern_subtable_fmt1_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
static void gxv_kern_subtable_fmt2_clstbl_validate (FT_Bytes table, FT_Bytes limit, GXV_kern_ClassSpec spec, GXV_Validator valid)
static void gxv_kern_subtable_fmt2_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
static void gxv_kern_subtable_fmt3_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
static FT_Bool gxv_kern_coverage_new_apple_validate (FT_UShort coverage, FT_UShort *format, GXV_Validator valid)
static FT_Bool gxv_kern_coverage_classic_apple_validate (FT_UShort coverage, FT_UShort *format, GXV_Validator valid)
static FT_Bool gxv_kern_coverage_classic_microsoft_validate (FT_UShort coverage, FT_UShort *format, GXV_Validator valid)
static GXV_kern_Dialect gxv_kern_coverage_validate (FT_UShort coverage, FT_UShort *format, GXV_Validator valid)
static void gxv_kern_subtable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
static void gxv_kern_validate_generic (FT_Bytes table, FT_Face face, FT_Bool classic_only, GXV_kern_Dialect dialect_request, FT_Validator ftvalid)
 gxv_kern_validate (FT_Bytes table, FT_Face face, FT_Validator ftvalid)
 gxv_kern_validate_classic (FT_Bytes table, FT_Face face, FT_Int dialect_flags, FT_Validator ftvalid)


Define Documentation

#define FT_COMPONENT   trace_gxvkern

Definition at line 42 of file gxvkern.c.

#define GXV_KERN_DATA ( field   )     GXV_TABLE_DATA( kern, field )

Definition at line 80 of file gxvkern.c.

Referenced by gxv_kern_subtable_fmt2_validate(), and gxv_kern_validate_generic().

#define GXV_KERN_FMT2_DATA ( field   ) 

Value:

( ( (GXV_kern_subtable_fmt2_DataRec *)              \
              ( GXV_KERN_DATA( subtable_data ) ) )->field )

Definition at line 351 of file gxvkern.c.

Referenced by gxv_kern_subtable_fmt2_clstbl_validate(), and gxv_kern_subtable_fmt2_validate().

#define GXV_KERN_HEADER_SIZE   ( KERN_IS_NEW( valid ) ? 8 : 4 )

Definition at line 94 of file gxvkern.c.

#define GXV_KERN_SUBTABLE_HEADER_SIZE   ( KERN_IS_NEW( valid ) ? 8 : 6 )

Definition at line 95 of file gxvkern.c.

Referenced by gxv_kern_subtable_fmt0_validate(), gxv_kern_subtable_fmt2_validate(), and gxv_kern_subtable_fmt3_validate().

#define KERN_ALLOWS_APPLE ( valid   )     ( KERN_DIALECT( valid ) & KERN_DIALECT_APPLE )

Definition at line 91 of file gxvkern.c.

Referenced by gxv_kern_coverage_validate().

#define KERN_ALLOWS_MS ( valid   )     ( KERN_DIALECT( valid ) & KERN_DIALECT_MS )

Definition at line 89 of file gxvkern.c.

Referenced by gxv_kern_coverage_classic_apple_validate(), and gxv_kern_coverage_validate().

#define KERN_DIALECT ( valid   )     GXV_KERN_DATA( dialect_request )

Definition at line 87 of file gxvkern.c.

Referenced by gxv_kern_validate_generic().

#define KERN_IS_CLASSIC ( valid   )     ( KERN_VERSION_CLASSIC == GXV_KERN_DATA( version ) )

Definition at line 82 of file gxvkern.c.

Referenced by gxv_kern_coverage_validate(), and gxv_kern_validate_generic().

#define KERN_IS_NEW ( valid   )     ( KERN_VERSION_NEW == GXV_KERN_DATA( version ) )

Definition at line 84 of file gxvkern.c.

Referenced by gxv_kern_coverage_validate(), gxv_kern_subtable_validate(), and gxv_kern_validate_generic().


Typedef Documentation

typedef enum GXV_kern_ClassSpec_ GXV_kern_ClassSpec

typedef struct GXV_kern_DataRec_ * GXV_kern_Data

typedef struct GXV_kern_DataRec_ GXV_kern_DataRec

typedef enum GXV_kern_Dialect_ GXV_kern_Dialect

typedef struct GXV_kern_fmt1_StateOptRec_ GXV_kern_fmt1_StateOptRec

typedef struct GXV_kern_fmt1_StateOptRec_ * GXV_kern_fmt1_StateOptRecData

typedef struct GXV_kern_subtable_fmt2_DataRec_ * GXV_kern_subtable_fmt2_Data

typedef struct GXV_kern_subtable_fmt2_DataRec_ GXV_kern_subtable_fmt2_DataRec

typedef enum GXV_kern_Version_ GXV_kern_Version


Enumeration Type Documentation

enum GXV_kern_ClassSpec_

Definition at line 327 of file gxvkern.c.

enum GXV_kern_Dialect_

Definition at line 61 of file gxvkern.c.

enum GXV_kern_Version_

Definition at line 53 of file gxvkern.c.


Function Documentation

static FT_Bool gxv_kern_coverage_classic_apple_validate ( FT_UShort  coverage,
FT_UShort format,
GXV_Validator  valid 
) [static]

Definition at line 576 of file gxvkern.c.

References FT_Bool, FT_BOOL, GXV_TRACE, and KERN_ALLOWS_MS.

Referenced by gxv_kern_coverage_validate().

static FT_Bool gxv_kern_coverage_classic_microsoft_validate ( FT_UShort  coverage,
FT_UShort format,
GXV_Validator  valid 
) [static]

Definition at line 613 of file gxvkern.c.

References FT_Bool, FT_BOOL, FT_UNUSED, and GXV_TRACE.

Referenced by gxv_kern_coverage_validate().

static FT_Bool gxv_kern_coverage_new_apple_validate ( FT_UShort  coverage,
FT_UShort format,
GXV_Validator  valid 
) [static]

Definition at line 543 of file gxvkern.c.

References FT_Bool, FT_BOOL, FT_UNUSED, and GXV_TRACE.

Referenced by gxv_kern_coverage_validate().

static GXV_kern_Dialect gxv_kern_coverage_validate ( FT_UShort  coverage,
FT_UShort format,
GXV_Validator  valid 
) [static]

Definition at line 659 of file gxvkern.c.

References GXV_EXIT, gxv_kern_coverage_classic_apple_validate(), gxv_kern_coverage_classic_microsoft_validate(), gxv_kern_coverage_new_apple_validate(), GXV_NAME_ENTER, GXV_TRACE, KERN_ALLOWS_APPLE, KERN_ALLOWS_MS, KERN_DIALECT_APPLE, KERN_DIALECT_MS, KERN_DIALECT_UNKNOWN, KERN_IS_CLASSIC, KERN_IS_NEW, and result().

Referenced by gxv_kern_subtable_validate().

static void gxv_kern_subtable_fmt0_pairs_validate ( FT_Bytes  table,
FT_Bytes  limit,
FT_UShort  nPairs,
GXV_Validator  valid 
) [static]

Definition at line 110 of file gxvkern.c.

References FT_INVALID_DATA, FT_NEXT_SHORT, FT_NEXT_USHORT, FT_UNUSED, GXV_EXIT, gxv_glyphid_validate(), GXV_NAME_ENTER, GXV_TRACE, i, and p.

Referenced by gxv_kern_subtable_fmt0_validate().

static void gxv_kern_subtable_fmt0_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  valid 
) [static]

Definition at line 166 of file gxvkern.c.

References gxv_BinSrchHeader_validate(), GXV_EXIT, gxv_kern_subtable_fmt0_pairs_validate(), GXV_KERN_SUBTABLE_HEADER_SIZE, GXV_LIMIT_CHECK, GXV_NAME_ENTER, and p.

Referenced by gxv_kern_subtable_validate().

static void gxv_kern_subtable_fmt1_entry_validate ( FT_Byte  state,
FT_UShort  flags,
GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  valid 
) [static]

Definition at line 256 of file gxvkern.c.

References FT_INVALID_OFFSET, FT_NEXT_USHORT, FT_UNUSED, GXV_LIMIT_CHECK, if(), p, GXV_kern_fmt1_StateOptRec_::valueTable, and GXV_kern_fmt1_StateOptRec_::valueTable_length.

Referenced by gxv_kern_subtable_fmt1_validate().

static void gxv_kern_subtable_fmt1_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  valid 
) [static]

Definition at line 222 of file gxvkern.c.

References gxv_set_length_by_ushort_offset(), l, o, GXV_kern_fmt1_StateOptRec_::valueTable, and GXV_kern_fmt1_StateOptRec_::valueTable_length.

Referenced by gxv_kern_subtable_fmt1_validate().

static void gxv_kern_subtable_fmt1_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  valid 
) [static]

Definition at line 298 of file gxvkern.c.

References GXV_EXIT, GXV_GLYPHOFFSET_NONE, gxv_kern_subtable_fmt1_entry_validate(), gxv_kern_subtable_fmt1_subtable_setup(), gxv_kern_subtable_fmt1_valueTable_load(), GXV_NAME_ENTER, gxv_StateTable_validate(), and p.

Referenced by gxv_kern_subtable_validate().

static void gxv_kern_subtable_fmt1_valueTable_load ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  valid 
) [static]

Definition at line 204 of file gxvkern.c.

References FT_NEXT_USHORT, GXV_LIMIT_CHECK, p, and GXV_kern_fmt1_StateOptRec_::valueTable.

Referenced by gxv_kern_subtable_fmt1_validate().

static void gxv_kern_subtable_fmt2_clstbl_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_kern_ClassSpec  spec,
GXV_Validator  valid 
) [static]

Definition at line 359 of file gxvkern.c.

References FT_NEXT_USHORT, gxv_array_getlimits_ushort(), GXV_EXIT, gxv_glyphid_validate(), GXV_KERN_FMT2_DATA, GXV_LIMIT_CHECK, GXV_NAME_ENTER, gxv_odtect_add_range(), GXV_TRACE, and p.

Referenced by gxv_kern_subtable_fmt2_validate().

static void gxv_kern_subtable_fmt2_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  valid 
) [static]

Definition at line 395 of file gxvkern.c.

References array, FT_INVALID_OFFSET, FT_NEXT_USHORT, GXV_EXIT, GXV_KERN_CLS_L, GXV_KERN_CLS_R, GXV_KERN_DATA, GXV_KERN_FMT2_DATA, gxv_kern_subtable_fmt2_clstbl_validate(), GXV_KERN_SUBTABLE_HEADER_SIZE, GXV_LIMIT_CHECK, GXV_NAME_ENTER, GXV_ODTECT, gxv_odtect_add_range(), GXV_ODTECT_INIT, gxv_odtect_validate(), GXV_TRACE, NULL, GXV_kern_subtable_fmt2_DataRec_::odtect, and p.

Referenced by gxv_kern_subtable_validate().

static void gxv_kern_subtable_fmt3_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  valid 
) [static]

Definition at line 453 of file gxvkern.c.

References flags, FT_INVALID_DATA, FT_INVALID_GLYPH_ID, FT_INVALID_OFFSET, FT_NEXT_BYTE, FT_NEXT_USHORT, FT_VALIDATE_PARANOID, gxv_array_getlimits_byte(), GXV_EXIT, GXV_KERN_SUBTABLE_HEADER_SIZE, GXV_LIMIT_CHECK, GXV_NAME_ENTER, GXV_TRACE, i, j, max, min, and p.

Referenced by gxv_kern_subtable_validate().

static void gxv_kern_subtable_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  valid 
) [static]

Definition at line 712 of file gxvkern.c.

References FT_INVALID_DATA, FT_NEXT_USHORT, GXV_EXIT, gxv_kern_coverage_validate(), gxv_kern_subtable_fmt0_validate(), gxv_kern_subtable_fmt1_validate(), gxv_kern_subtable_fmt2_validate(), gxv_kern_subtable_fmt3_validate(), GXV_LIMIT_CHECK, GXV_NAME_ENTER, GXV_TRACE, KERN_DIALECT_APPLE, KERN_DIALECT_MS, KERN_IS_NEW, length, p, and version.

Referenced by gxv_kern_validate_generic().

gxv_kern_validate ( FT_Bytes  table,
FT_Face  face,
FT_Validator  ftvalid 
)

Definition at line 854 of file gxvkern.c.

References gxv_kern_validate_generic(), and KERN_DIALECT_ANY.

gxv_kern_validate_classic ( FT_Bytes  table,
FT_Face  face,
FT_Int  dialect_flags,
FT_Validator  ftvalid 
)

Definition at line 863 of file gxvkern.c.

References gxv_kern_validate_generic().

Referenced by classic_kern_validate().

static void gxv_kern_validate_generic ( FT_Bytes  table,
FT_Face  face,
FT_Bool  classic_only,
GXV_kern_Dialect  dialect_request,
FT_Validator  ftvalid 
) [static]

Definition at line 790 of file gxvkern.c.

References FT_INVALID_FORMAT, FT_NEXT_ULONG, FT_NEXT_USHORT, FT_TRACE3, FT_TRACE4, GXV_INIT, GXV_KERN_DATA, gxv_kern_subtable_validate(), GXV_LIMIT_CHECK, GXV_TRACE, i, KERN_DIALECT, KERN_IS_CLASSIC, KERN_IS_NEW, p, and version.

Referenced by gxv_kern_validate(), and gxv_kern_validate_classic().


Generated on Tue Jul 5 15:58:23 2011 for ROOT_528-00b_version by  doxygen 1.5.1