1 /***************************************************************************/
5 /* CID-keyed Type1 parser (specification). */
7 /* Copyright 1996-2001 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 __CIDPARSE_H__
20 #define __CIDPARSE_H__
24 #include FT_INTERNAL_TYPE1_TYPES_H
25 #include FT_INTERNAL_STREAM_H
26 #include FT_INTERNAL_POSTSCRIPT_AUX_H
32 /*************************************************************************/
38 /* A CID_Parser is an object used to parse a Type 1 fonts very */
42 /* root :: the root T1_Parser fields */
44 /* stream :: The current input stream. */
46 /* postscript :: A pointer to the data to be parsed. */
48 /* postscript_len :: The length of the data to be parsed. */
50 /* data_offset :: The start position of the binary data (i.e., the */
51 /* end of the data to be parsed. */
53 /* cid :: A structure which holds the information about */
54 /* the current font. */
56 /* num_dict :: The number of font dictionaries. */
58 typedef struct CID_Parser_
64 FT_Int postscript_len;
75 CID_New_Parser( CID_Parser* parser,
78 PSAux_Interface* psaux );
81 CID_Done_Parser( CID_Parser* parser );
84 /*************************************************************************/
86 /* PARSING ROUTINES */
88 /*************************************************************************/
90 #define CID_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
91 #define CID_Skip_Alpha( p ) (p)->root.funcs.skip_alpha ( &(p)->root )
93 #define CID_ToInt( p ) (p)->root.funcs.to_int( &(p)->root )
94 #define CID_ToFixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
96 #define CID_ToCoordArray( p, m, c ) \
97 (p)->root.funcs.to_coord_array( &(p)->root, m, c )
98 #define CID_ToFixedArray( p, m, f, t ) \
99 (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
100 #define CID_ToToken( p, t ) \
101 (p)->root.funcs.to_token( &(p)->root, t )
102 #define CID_ToTokenArray( p, t, m, c ) \
103 (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
105 #define CID_Load_Field( p, f, o ) \
106 (p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
107 #define CID_Load_Field_Table( p, f, o ) \
108 (p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
113 #endif /* __CIDPARSE_H__ */