zenilib: zenilib/jni/external/freetype2/src/cid/cidparse.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
cidparse.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* cidparse.h */
4 /* */
5 /* CID-keyed Type1 parser (specification). */
6 /* */
7 /* Copyright 1996-2001, 2002, 2003, 2004 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
15 /* */
16 /***************************************************************************/
17
18
19 #ifndef __CIDPARSE_H__
20 #define __CIDPARSE_H__
21
22
23 #include <ft2build.h>
24 #include FT_INTERNAL_TYPE1_TYPES_H
25 #include FT_INTERNAL_STREAM_H
26 #include FT_INTERNAL_POSTSCRIPT_AUX_H
27
28
29 FT_BEGIN_HEADER
30
31
32 /*************************************************************************/
33 /* */
34 /* <Struct> */
35 /* CID_Parser */
36 /* */
37 /* <Description> */
38 /* A CID_Parser is an object used to parse a Type 1 fonts very */
39 /* quickly. */
40 /* */
41 /* <Fields> */
42 /* root :: The root PS_ParserRec fields. */
43 /* */
44 /* stream :: The current input stream. */
45 /* */
46 /* postscript :: A pointer to the data to be parsed. */
47 /* */
48 /* postscript_len :: The length of the data to be parsed. */
49 /* */
50 /* data_offset :: The start position of the binary data (i.e., the */
51 /* end of the data to be parsed. */
52 /* */
53 /* binary_length :: The length of the data after the `StartData' */
54 /* command if the data format is hexadecimal. */
55 /* */
56 /* cid :: A structure which holds the information about */
57 /* the current font. */
58 /* */
59 /* num_dict :: The number of font dictionaries. */
60 /* */
61 typedef struct CID_Parser_
62 {
63 PS_ParserRec root;
64 FT_Stream stream;
65
66 FT_Byte* postscript;
67 FT_Long postscript_len;
68
69 FT_ULong data_offset;
70
71 FT_Long binary_length;
72
73 CID_FaceInfo cid;
74 FT_Int num_dict;
75
76 } CID_Parser;
77
78
79 FT_LOCAL( FT_Error )
80 cid_parser_new( CID_Parser* parser,
81 FT_Stream stream,
82 FT_Memory memory,
83 PSAux_Service psaux );
84
85 FT_LOCAL( void )
86 cid_parser_done( CID_Parser* parser );
87
88
89 /*************************************************************************/
90 /* */
91 /* PARSING ROUTINES */
92 /* */
93 /*************************************************************************/
94
95 #define cid_parser_skip_spaces( p ) \
96 (p)->root.funcs.skip_spaces( &(p)->root )
97 #define cid_parser_skip_PS_token( p ) \
98 (p)->root.funcs.skip_PS_token( &(p)->root )
99
100 #define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root )
101 #define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
102
103 #define cid_parser_to_coord_array( p, m, c ) \
104 (p)->root.funcs.to_coord_array( &(p)->root, m, c )
105 #define cid_parser_to_fixed_array( p, m, f, t ) \
106 (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
107 #define cid_parser_to_token( p, t ) \
108 (p)->root.funcs.to_token( &(p)->root, t )
109 #define cid_parser_to_token_array( p, t, m, c ) \
110 (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
111
112 #define cid_parser_load_field( p, f, o ) \
113 (p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
114 #define cid_parser_load_field_table( p, f, o ) \
115 (p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
116
117
118 FT_END_HEADER
119
120 #endif /* __CIDPARSE_H__ */
121
122
123 /* END */
cid_parser_done
cid_parser_done(CID_Parser *parser)
Definition: cidparse.c:211
FT_Error
int FT_Error
Definition: fttypes.h:296
FT_Long
signed long FT_Long
Definition: fttypes.h:238
FT_ULong
unsigned long FT_ULong
Definition: fttypes.h:249
cid_parser_new
cid_parser_new(CID_Parser *parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux)
Definition: cidparse.c:51
FT_END_HEADER
#define FT_END_HEADER
Definition: ftheader.h:54
CID_Parser_::binary_length
FT_Long binary_length
Definition: cidparse.h:71
FT_Int
signed int FT_Int
Definition: fttypes.h:216
stream
GLuint GLuint stream
Definition: glew.h:6573
PS_ParserRec_
Definition: psaux.h:424
CID_Parser_
Definition: cidparse.h:61
CID_FaceInfoRec_
Definition: t1tables.h:351
CID_Parser
FT_BEGIN_HEADER struct CID_Parser_ CID_Parser
CID_Parser_::num_dict
FT_Int num_dict
Definition: cidparse.h:74
FT_Byte
unsigned char FT_Byte
Definition: fttypes.h:150
FT_BEGIN_HEADER
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
FT_LOCAL
#define FT_LOCAL(x)
Definition: ftconfig.h:466
CID_Parser_::postscript_len
FT_Long postscript_len
Definition: cidparse.h:67
CID_Parser_::data_offset
FT_ULong data_offset
Definition: cidparse.h:69
FT_Memory
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
CID_Parser_::root
PS_ParserRec root
Definition: cidparse.h:63
ft2build.h
CID_Parser_::postscript
FT_Byte * postscript
Definition: cidparse.h:66
CID_Parser_::stream
FT_Stream stream
Definition: cidparse.h:64
FT_StreamRec_
Definition: ftsystem.h:321
PSAux_ServiceRec_
Definition: psaux.h:794
CID_Parser_::cid
CID_FaceInfo cid
Definition: cidparse.h:73