cffparse.c File Reference

#include <ft2build.h>
#include "cffparse.h"
#include "cfferrs.h"
#include "cffpic.h"
#include "cfftoken.h"

Go to the source code of this file.

Defines

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

Functions

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

Variables

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


Define Documentation

#define CFF_FIELD ( code,
name,
kind   ) 

Value:

{                          \
            kind,                    \
            code | CFFCODE,          \
            FT_FIELD_OFFSET( name ), \
            FT_FIELD_SIZE( name ),   \
            0, 0, 0                  \
          },

Definition at line 598 of file cffparse.c.

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

Definition at line 578 of file cffparse.c.

#define CFF_FIELD_CALLBACK ( code,
name   ) 

Value:

{                              \
            cff_kind_callback,           \
            code | CFFCODE,              \
            0, 0,                        \
            cff_parse_ ## name,          \
            0, 0                         \
          },

Definition at line 588 of file cffparse.c.

#define CFF_FIELD_DELTA ( code,
name,
max   ) 

Value:

Definition at line 608 of file cffparse.c.

#define CFF_FIELD_DELTA ( code,
name,
max   )     CFF_FIELD( code, name, cff_kind_delta )

Definition at line 608 of file cffparse.c.

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

Definition at line 572 of file cffparse.c.

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

Definition at line 574 of file cffparse.c.

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

Definition at line 570 of file cffparse.c.

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

Definition at line 576 of file cffparse.c.

#define CFFCODE_PRIVATE   0x2000

Definition at line 584 of file cffparse.c.

#define CFFCODE_TOPDICT   0x1000

Definition at line 583 of file cffparse.c.

#define FT_COMPONENT   trace_cffparse

Definition at line 35 of file cffparse.c.


Function Documentation

static FT_Error cff_parse_cid_ros ( CFF_Parser  parser  )  [static]

Definition at line 544 of file cffparse.c.

References cff_parse_num(), CFF_FontRecDictRec_::cid_ordering, CFF_FontRecDictRec_::cid_registry, CFF_FontRecDictRec_::cid_supplement, data, error, FT_TRACE1, if(), CFF_ParserRec_::object, CFF_ParserRec_::stack, and CFF_ParserRec_::top.

static FT_Fixed cff_parse_fixed ( FT_Byte **  d  )  [static]

Definition at line 378 of file cffparse.c.

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

Referenced by cff_parse_font_bbox().

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

Definition at line 401 of file cffparse.c.

References cff_parse_integer(), cff_parse_real(), FT_ASSERT, FT_DivFix(), number, 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 388 of file cffparse.c.

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

Referenced by cff_parse_font_matrix().

static FT_Error cff_parse_font_bbox ( CFF_Parser  parser  )  [static]

Definition at line 499 of file cffparse.c.

References cff_parse_fixed(), data, error, CFF_FontRecDictRec_::font_bbox, FT_RoundFix(), if(), CFF_ParserRec_::object, CFF_ParserRec_::stack, and CFF_ParserRec_::top.

static FT_Error cff_parse_font_matrix ( CFF_Parser  parser  )  [static]

Definition at line 443 of file cffparse.c.

References cff_parse_fixed_dynamic(), cff_parse_fixed_scaled(), data, error, CFF_FontRecDictRec_::font_matrix, CFF_FontRecDictRec_::font_offset, if(), RooFitShortHand::L(), CFF_ParserRec_::object, power_tens, CFF_ParserRec_::stack, CFF_ParserRec_::top, and CFF_FontRecDictRec_::units_per_em.

static FT_Long cff_parse_integer ( FT_Byte start,
FT_Byte limit 
) [static]

Definition at line 57 of file cffparse.c.

References p, and val.

Referenced by cff_parse_fixed(), cff_parse_fixed_dynamic(), cff_parse_fixed_scaled(), and cff_parse_num().

static FT_Long cff_parse_num ( FT_Byte **  d  )  [static]

Definition at line 369 of file cffparse.c.

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

Referenced by cff_parse_cid_ros(), and cff_parse_private_dict().

static FT_Error cff_parse_private_dict ( CFF_Parser  parser  )  [static]

Definition at line 523 of file cffparse.c.

References cff_parse_num(), data, error, if(), CFF_ParserRec_::object, CFF_FontRecDictRec_::private_offset, CFF_FontRecDictRec_::private_size, CFF_ParserRec_::stack, and CFF_ParserRec_::top.

static FT_Fixed cff_parse_real ( FT_Byte start,
FT_Byte limit,
FT_Long  power_ten,
FT_Long scaling 
) [static]

Definition at line 131 of file cffparse.c.

References FT_ABS, FT_DivFix(), FT_MIN, FT_UNUSED, number, p, power_tens, result(), and RootCsg::sign().

Referenced by cff_parse_fixed(), cff_parse_fixed_dynamic(), cff_parse_fixed_scaled(), and cff_parse_num().

cff_parser_init ( CFF_Parser  parser,
FT_UInt  code,
void *  object,
FT_Library  library 
)

Definition at line 41 of file cffparse.c.

References FT_MEM_ZERO.

Referenced by cff_subfont_load().

cff_parser_run ( CFF_Parser  parser,
FT_Byte start,
FT_Byte limit 
)

Definition at line 811 of file cffparse.c.

Referenced by cff_subfont_load().


Variable Documentation

const CFF_Field_Handler cff_field_handlers[] [static]

Definition at line 619 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 114 of file cffparse.c.

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


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