1 /***************************************************************************/
2 /* */
3 /* cffparse.h */
4 /* */
5 /* CFF token stream parser (specification) */
6 /* */
7 /* Copyright 1996-2001 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 /***************************************************************************/
19 #ifndef __CFF_PARSE_H__
20 #define __CFF_PARSE_H__
23 #include <ft2build.h>
24 #include FT_INTERNAL_CFF_TYPES_H
25 #include FT_INTERNAL_OBJECTS_H
28 FT_BEGIN_HEADER
31 #define CFF_MAX_STACK_DEPTH 96
33 #define CFF_CODE_TOPDICT 0x1000
34 #define CFF_CODE_PRIVATE 0x2000
37 typedef struct CFF_Parser_
38 {
39 FT_Byte* start;
40 FT_Byte* limit;
41 FT_Byte* cursor;
43 FT_Byte* stack[CFF_MAX_STACK_DEPTH + 1];
44 FT_Byte** top;
46 FT_UInt object_code;
47 void* object;
49 } CFF_Parser;
52 FT_LOCAL void
53 CFF_Parser_Init( CFF_Parser* parser,
54 FT_UInt code,
55 void* object );
57 FT_LOCAL FT_Error
58 CFF_Parser_Run( CFF_Parser* parser,
59 FT_Byte* start,
60 FT_Byte* limit );
63 FT_END_HEADER
66 #endif /* __CFF_PARSE_H__ */
69 /* END */