zenilib: zenilib/jni/external/freetype2/src/type1/t1parse.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
t1parse.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* t1parse.h */
4 /* */
5 /* Type 1 parser (specification). */
6 /* */
7 /* Copyright 1996-2001, 2002, 2003, 2008 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 __T1PARSE_H__
20 #define __T1PARSE_H__
21
22
23 #include <ft2build.h>
24 #include FT_INTERNAL_TYPE1_TYPES_H
25 #include FT_INTERNAL_STREAM_H
26
27
28 FT_BEGIN_HEADER
29
30
31 /*************************************************************************/
32 /* */
33 /* <Struct> */
34 /* T1_ParserRec */
35 /* */
36 /* <Description> */
37 /* A PS_ParserRec is an object used to parse a Type 1 fonts very */
38 /* quickly. */
39 /* */
40 /* <Fields> */
41 /* root :: The root parser. */
42 /* */
43 /* stream :: The current input stream. */
44 /* */
45 /* base_dict :: A pointer to the top-level dictionary. */
46 /* */
47 /* base_len :: The length in bytes of the top dictionary. */
48 /* */
49 /* private_dict :: A pointer to the private dictionary. */
50 /* */
51 /* private_len :: The length in bytes of the private dictionary. */
52 /* */
53 /* in_pfb :: A boolean. Indicates that we are handling a PFB */
54 /* file. */
55 /* */
56 /* in_memory :: A boolean. Indicates a memory-based stream. */
57 /* */
58 /* single_block :: A boolean. Indicates that the private dictionary */
59 /* is stored in lieu of the base dictionary. */
60 /* */
61 typedef struct T1_ParserRec_
62 {
63 PS_ParserRec root;
64 FT_Stream stream;
65
66 FT_Byte* base_dict;
67 FT_ULong base_len;
68
69 FT_Byte* private_dict;
70 FT_ULong private_len;
71
72 FT_Bool in_pfb;
73 FT_Bool in_memory;
74 FT_Bool single_block;
75
76 } T1_ParserRec, *T1_Parser;
77
78
79 #define T1_Add_Table( p, i, o, l ) (p)->funcs.add( (p), i, o, l )
80 #define T1_Done_Table( p ) \
81 do \
82 { \
83 if ( (p)->funcs.done ) \
84 (p)->funcs.done( p ); \
85 } while ( 0 )
86 #define T1_Release_Table( p ) \
87 do \
88 { \
89 if ( (p)->funcs.release ) \
90 (p)->funcs.release( p ); \
91 } while ( 0 )
92
93
94 #define T1_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
95 #define T1_Skip_PS_Token( p ) (p)->root.funcs.skip_PS_token( &(p)->root )
96
97 #define T1_ToInt( p ) (p)->root.funcs.to_int( &(p)->root )
98 #define T1_ToFixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
99
100 #define T1_ToCoordArray( p, m, c ) \
101 (p)->root.funcs.to_coord_array( &(p)->root, m, c )
102 #define T1_ToFixedArray( p, m, f, t ) \
103 (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
104 #define T1_ToToken( p, t ) \
105 (p)->root.funcs.to_token( &(p)->root, t )
106 #define T1_ToTokenArray( p, t, m, c ) \
107 (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
108
109 #define T1_Load_Field( p, f, o, m, pf ) \
110 (p)->root.funcs.load_field( &(p)->root, f, o, m, pf )
111
112 #define T1_Load_Field_Table( p, f, o, m, pf ) \
113 (p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf )
114
115
116 FT_LOCAL( FT_Error )
117 T1_New_Parser( T1_Parser parser,
118 FT_Stream stream,
119 FT_Memory memory,
120 PSAux_Service psaux );
121
122 FT_LOCAL( FT_Error )
123 T1_Get_Private_Dict( T1_Parser parser,
124 PSAux_Service psaux );
125
126 FT_LOCAL( void )
127 T1_Finalize_Parser( T1_Parser parser );
128
129
130 FT_END_HEADER
131
132 #endif /* __T1PARSE_H__ */
133
134
135 /* END */
T1_ParserRec_::in_pfb
FT_Bool in_pfb
Definition: t1parse.h:72
T1_Finalize_Parser
T1_Finalize_Parser(T1_Parser parser)
Definition: t1parse.c:244
FT_Error
int FT_Error
Definition: fttypes.h:296
T1_ParserRec
FT_BEGIN_HEADER struct T1_ParserRec_ T1_ParserRec
FT_ULong
unsigned long FT_ULong
Definition: fttypes.h:249
FT_END_HEADER
#define FT_END_HEADER
Definition: ftheader.h:54
T1_New_Parser
T1_New_Parser(T1_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux)
Definition: t1parse.c:136
stream
GLuint GLuint stream
Definition: glew.h:6573
PS_ParserRec_
Definition: psaux.h:424
T1_ParserRec_::private_dict
FT_Byte * private_dict
Definition: t1parse.h:69
T1_ParserRec_::stream
FT_Stream stream
Definition: t1parse.h:64
FT_Bool
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
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
T1_ParserRec_::base_len
FT_ULong base_len
Definition: t1parse.h:67
T1_ParserRec_::private_len
FT_ULong private_len
Definition: t1parse.h:70
T1_ParserRec_::base_dict
FT_Byte * base_dict
Definition: t1parse.h:66
T1_Get_Private_Dict
T1_Get_Private_Dict(T1_Parser parser, PSAux_Service psaux)
Definition: t1parse.c:261
FT_Memory
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
ft2build.h
T1_ParserRec_::root
PS_ParserRec root
Definition: t1parse.h:63
T1_ParserRec_
Definition: t1parse.h:61
T1_Parser
FT_BEGIN_HEADER struct T1_ParserRec_ * T1_Parser
T1_ParserRec_::single_block
FT_Bool single_block
Definition: t1parse.h:74
T1_ParserRec_::in_memory
FT_Bool in_memory
Definition: t1parse.h:73
FT_StreamRec_
Definition: ftsystem.h:321
PSAux_ServiceRec_
Definition: psaux.h:794