blob: aa78a9d9f99521b89dd2f404daa39c572c47c1e7 [file] [log] [blame]
David Turner19ed8af2000-12-08 02:42:29 +00001/***************************************************************************/
2/* */
3/* cffparse.h */
4/* */
5/* CFF token stream parser (specification) */
6/* */
7/* Copyright 1996-2000 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 __CFF_PARSE_H__
20#define __CFF_PARSE_H__
21
Werner Lembergcc069be2000-12-08 16:17:16 +000022
David Turner19ed8af2000-12-08 02:42:29 +000023#include <ft2build.h>
24#include FT_INTERNAL_CFF_TYPES_H
25#include FT_INTERNAL_OBJECTS_H
26
Werner Lembergcc069be2000-12-08 16:17:16 +000027
David Turner19ed8af2000-12-08 02:42:29 +000028FT_BEGIN_HEADER
29
Werner Lembergcc069be2000-12-08 16:17:16 +000030
David Turner19ed8af2000-12-08 02:42:29 +000031#define CFF_MAX_STACK_DEPTH 96
32
33#define CFF_CODE_TOPDICT 0x1000
34#define CFF_CODE_PRIVATE 0x2000
35
36
David Turner19ed8af2000-12-08 02:42:29 +000037 typedef struct CFF_Parser_
38 {
39 FT_Byte* start;
40 FT_Byte* limit;
41 FT_Byte* cursor;
42
43 FT_Byte* stack[CFF_MAX_STACK_DEPTH + 1];
44 FT_Byte** top;
45
46 FT_UInt object_code;
47 void* object;
48
49 } CFF_Parser;
50
51
Werner Lembergcc069be2000-12-08 16:17:16 +000052 FT_LOCAL
53 void CFF_Parser_Init( CFF_Parser* parser,
54 FT_UInt code,
55 void* object );
David Turner19ed8af2000-12-08 02:42:29 +000056
Werner Lembergcc069be2000-12-08 16:17:16 +000057 FT_LOCAL
58 FT_Error CFF_Parser_Run( CFF_Parser* parser,
59 FT_Byte* start,
60 FT_Byte* limit );
David Turner19ed8af2000-12-08 02:42:29 +000061
62
63FT_END_HEADER
64
Werner Lembergcc069be2000-12-08 16:17:16 +000065
David Turner19ed8af2000-12-08 02:42:29 +000066#endif /* __CFF_PARSE_H__ */
67
68
69/* END */