zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
gxvkern.c File Reference
#include "gxvalid.h"
#include "gxvcommn.h"
#include <FT_SFNT_NAMES_H>
#include <FT_SERVICE_GX_VALIDATE_H>

Go to the source code of this file.

Macros

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

Typedefs

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
 

Enumerations

enum  GXV_kern_ClassSpec_ { GXV_KERN_CLS_L = 0, GXV_KERN_CLS_R }
 
enum  GXV_kern_Dialect_ { KERN_DIALECT_UNKNOWN = 0, KERN_DIALECT_MS = FT_VALIDATE_MS, KERN_DIALECT_APPLE = FT_VALIDATE_APPLE, KERN_DIALECT_ANY = FT_VALIDATE_CKERN }
 
enum  GXV_kern_Version_ { KERN_VERSION_CLASSIC = 0x0000, KERN_VERSION_NEW = 0x0001 }
 

Functions

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 FT_Bool gxv_kern_coverage_new_apple_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_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_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_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_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_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 void gxv_kern_subtable_validate (FT_Bytes table, FT_Bytes limit, GXV_Validator valid)
 
 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)
 
static void gxv_kern_validate_generic (FT_Bytes table, FT_Face face, FT_Bool classic_only, GXV_kern_Dialect dialect_request, FT_Validator ftvalid)
 

Macro Definition 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_DATA( subtable_data ) ) )->field )
#define GXV_KERN_DATA(field)
Definition: gxvkern.c:80
struct GXV_kern_subtable_fmt2_DataRec_ GXV_kern_subtable_fmt2_DataRec

Definition at line 367 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 )
#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 )
#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 ) )

Typedef Documentation

typedef struct GXV_kern_DataRec_ * GXV_kern_Data
typedef struct GXV_kern_DataRec_ GXV_kern_DataRec
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

Enumeration Type Documentation

Enumerator
GXV_KERN_CLS_L 
GXV_KERN_CLS_R 

Definition at line 343 of file gxvkern.c.

Enumerator
KERN_DIALECT_UNKNOWN 
KERN_DIALECT_MS 
KERN_DIALECT_APPLE 
KERN_DIALECT_ANY 

Definition at line 61 of file gxvkern.c.

Enumerator
KERN_VERSION_CLASSIC 
KERN_VERSION_NEW 

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 598 of file gxvkern.c.

References FALSE, FT_Bool, FT_BOOL, GXV_TRACE, KERN_ALLOWS_MS, and TRUE.

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 639 of file gxvkern.c.

References FALSE, FT_Bool, FT_BOOL, FT_UNUSED, GXV_TRACE, and TRUE.

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 561 of file gxvkern.c.

References FALSE, FT_Bool, FT_BOOL, FT_UNUSED, GXV_TRACE, and TRUE.

Referenced by gxv_kern_coverage_validate().

static void gxv_kern_subtable_fmt0_pairs_validate ( FT_Bytes  table,
FT_Bytes  limit,
FT_UShort  nPairs,
GXV_Validator  valid 
)
static
static void gxv_kern_subtable_fmt0_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  valid 
)
static
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
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
static void gxv_kern_subtable_fmt1_valueTable_load ( FT_Bytes  table,
FT_Bytes  limit,
GXV_Validator  valid 
)
static
static void gxv_kern_subtable_fmt2_clstbl_validate ( FT_Bytes  table,
FT_Bytes  limit,
GXV_kern_ClassSpec  spec,
GXV_Validator  valid 
)
static
gxv_kern_validate ( FT_Bytes  table,
FT_Face  face,
FT_Validator  ftvalid 
)

Definition at line 900 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 909 of file gxvkern.c.

References gxv_kern_validate_generic().

Referenced by classic_kern_validate().