1 /***************************************************************************/
5 /* CFF token stream parser (specification) */
7 /* Copyright 1996-2003, 2011 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
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. */
16 /***************************************************************************/
19 #ifndef __CFF_PARSE_H__
20 #define __CFF_PARSE_H__
25 #include FT_INTERNAL_OBJECTS_H
31 #define CFF_MAX_STACK_DEPTH 96
33 #define CFF_CODE_TOPDICT 0x1000
34 #define CFF_CODE_PRIVATE 0x2000
37 typedef struct CFF_ParserRec_
44 FT_Byte* stack[CFF_MAX_STACK_DEPTH + 1];
50 } CFF_ParserRec, *CFF_Parser;
54 cff_parser_init( CFF_Parser parser,
60 cff_parser_run( CFF_Parser parser,
70 cff_kind_fixed_thousand,
76 cff_kind_max /* do not remove */
80 /* now generate handlers for the most simple fields */
81 typedef FT_Error (*CFF_Field_Reader)( CFF_Parser parser );
83 typedef struct CFF_Field_Handler_
89 CFF_Field_Reader reader;
93 #ifdef FT_DEBUG_LEVEL_TRACE
103 #endif /* __CFF_PARSE_H__ */