zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
cffparse.c File Reference
#include <ft2build.h>
#include "cffparse.h"
#include <FT_INTERNAL_STREAM_H>
#include <FT_INTERNAL_DEBUG_H>
#include "cfferrs.h"
#include "cffpic.h"
#include "cfftoken.h"

Go to the source code of this file.

Macros

#define CFF_FIELD(code, name, id, kind)
 
#define CFF_FIELD_BOOL(code, name, id)   CFF_FIELD( code, name, id, cff_kind_bool )
 
#define CFF_FIELD_CALLBACK(code, name, id)
 
#define CFF_FIELD_DELTA(code, name, max, id)
 
#define CFF_FIELD_FIXED(code, name, id)   CFF_FIELD( code, name, id, cff_kind_fixed )
 
#define CFF_FIELD_FIXED_1000(code, name, id)   CFF_FIELD( code, name, id, cff_kind_fixed_thousand )
 
#define CFF_FIELD_NUM(code, name, id)   CFF_FIELD( code, name, id, cff_kind_num )
 
#define CFF_FIELD_STRING(code, name, id)   CFF_FIELD( code, name, id, cff_kind_string )
 
#define CFFCODE_PRIVATE   0x2000
 
#define CFFCODE_TOPDICT   0x1000
 
#define FT_COMPONENT   trace_cffparse
 

Functions

static FT_Error cff_parse_cid_ros (CFF_Parser parser)
 
static FT_Fixed cff_parse_fixed (FT_Byte **d)
 
static FT_Fixed cff_parse_fixed_dynamic (FT_Byte **d, FT_Long *scaling)
 
static FT_Fixed cff_parse_fixed_scaled (FT_Byte **d, FT_Long scaling)
 
static FT_Error cff_parse_font_bbox (CFF_Parser parser)
 
static FT_Error cff_parse_font_matrix (CFF_Parser parser)
 
static FT_Long cff_parse_integer (FT_Byte *start, FT_Byte *limit)
 
static FT_Long cff_parse_num (FT_Byte **d)
 
static FT_Error cff_parse_private_dict (CFF_Parser parser)
 
static FT_Fixed cff_parse_real (FT_Byte *start, FT_Byte *limit, FT_Long power_ten, FT_Long *scaling)
 
 cff_parser_init (CFF_Parser parser, FT_UInt code, void *object, FT_Library library)
 
 cff_parser_run (CFF_Parser parser, FT_Byte *start, FT_Byte *limit)
 

Variables

static const CFF_Field_Handler cff_field_handlers []
 
static const FT_Long power_tens []
 

Macro Definition Documentation

#define CFF_FIELD (   code,
  name,
  id,
  kind 
)
Value:
{ \
kind, \
code | CFFCODE, \
0, 0, 0 \
},
#define FT_FIELD_OFFSET(f)
Definition: ftstream.h:105
#define FT_FIELD_SIZE(f)
Definition: ftstream.h:99
EGLImageKHR EGLint * name
Definition: eglext.h:284
#define CFFCODE

Definition at line 637 of file cffparse.c.

#define CFF_FIELD_BOOL (   code,
  name,
  id 
)    CFF_FIELD( code, name, id, cff_kind_bool )

Definition at line 611 of file cffparse.c.

#define CFF_FIELD_CALLBACK (   code,
  name,
  id 
)
Value:
{ \
code | CFFCODE, \
0, 0, \
cff_parse_ ## name, \
0, 0 \
},
EGLImageKHR EGLint * name
Definition: eglext.h:284
#define CFFCODE

Definition at line 628 of file cffparse.c.

#define CFF_FIELD_DELTA (   code,
  name,
  max,
  id 
)
Value:
{ \
code | CFFCODE, \
0, \
FT_FIELD_OFFSET( num_ ## name ) \
},
#define FT_FIELD_SIZE_DELTA(f)
Definition: ftstream.h:102
#define FT_FIELD_OFFSET(f)
Definition: ftstream.h:105
EGLImageKHR EGLint * name
Definition: eglext.h:284
#define CFFCODE
#define max(x, y)
Definition: os.h:79

Definition at line 646 of file cffparse.c.

#define CFF_FIELD_FIXED (   code,
  name,
  id 
)    CFF_FIELD( code, name, id, cff_kind_fixed )

Definition at line 605 of file cffparse.c.

#define CFF_FIELD_FIXED_1000 (   code,
  name,
  id 
)    CFF_FIELD( code, name, id, cff_kind_fixed_thousand )

Definition at line 607 of file cffparse.c.

#define CFF_FIELD_NUM (   code,
  name,
  id 
)    CFF_FIELD( code, name, id, cff_kind_num )

Definition at line 603 of file cffparse.c.

#define CFF_FIELD_STRING (   code,
  name,
  id 
)    CFF_FIELD( code, name, id, cff_kind_string )

Definition at line 609 of file cffparse.c.

#define CFFCODE_PRIVATE   0x2000

Definition at line 615 of file cffparse.c.

#define CFFCODE_TOPDICT   0x1000

Definition at line 614 of file cffparse.c.

#define FT_COMPONENT   trace_cffparse

Definition at line 35 of file cffparse.c.

Function Documentation

static FT_Fixed cff_parse_fixed ( FT_Byte **  d)
static

Definition at line 381 of file cffparse.c.

References cff_parse_integer(), cff_parse_real(), and NULL.

Referenced by cff_parse_font_bbox(), and cff_parser_run().

static FT_Fixed cff_parse_fixed_dynamic ( FT_Byte **  d,
FT_Long scaling 
)
static

Definition at line 404 of file cffparse.c.

References cff_parse_integer(), cff_parse_real(), FT_ASSERT, FT_DivFix(), and power_tens.

Referenced by cff_parse_font_matrix().

static FT_Fixed cff_parse_fixed_scaled ( FT_Byte **  d,
FT_Long  scaling 
)
static

Definition at line 391 of file cffparse.c.

References cff_parse_integer(), cff_parse_real(), NULL, and power_tens.

Referenced by cff_parse_font_matrix(), and cff_parser_run().

static FT_Long cff_parse_integer ( FT_Byte start,
FT_Byte limit 
)
static
static FT_Long cff_parse_num ( FT_Byte **  d)
static

Definition at line 372 of file cffparse.c.

References cff_parse_integer(), cff_parse_real(), and NULL.

Referenced by cff_parse_cid_ros(), cff_parse_private_dict(), and cff_parser_run().

static FT_Fixed cff_parse_real ( FT_Byte start,
FT_Byte limit,
FT_Long  power_ten,
FT_Long scaling 
)
static
cff_parser_init ( CFF_Parser  parser,
FT_UInt  code,
void object,
FT_Library  library 
)

Definition at line 39 of file cffparse.c.

References FT_MEM_ZERO, and library.

Referenced by cff_subfont_load().

Variable Documentation

const CFF_Field_Handler cff_field_handlers[]
static

Definition at line 657 of file cffparse.c.

const FT_Long power_tens[]
static
Initial value:
=
{
1L,
10L,
100L,
1000L,
10000L,
100000L,
1000000L,
10000000L,
100000000L,
1000000000L
}

Definition at line 112 of file cffparse.c.

Referenced by cff_parse_fixed_dynamic(), cff_parse_fixed_scaled(), cff_parse_font_matrix(), and cff_parse_real().