sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
cidparse.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * cidparse.h
4 *
5 * CID-keyed Type1 parser (specification).
6 *
7 * Copyright (C) 1996-2025 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
23#ifndef CIDPARSE_H_
24#define CIDPARSE_H_
25
26
30
31
32FT_BEGIN_HEADER
33
34
35 /**************************************************************************
36 *
37 * @Struct:
38 * CID_Parser
39 *
40 * @Description:
41 * A CID_Parser is an object used to parse a Type 1 fonts very
42 * quickly.
43 *
44 * @Fields:
45 * root ::
46 * The root PS_ParserRec fields.
47 *
48 * stream ::
49 * The current input stream.
50 *
51 * postscript ::
52 * A pointer to the data to be parsed.
53 *
54 * postscript_len ::
55 * The length of the data to be parsed.
56 *
57 * data_offset ::
58 * The start position of the binary data (i.e., the
59 * end of the data to be parsed.
60 *
61 * binary_length ::
62 * The length of the data after the `StartData'
63 * command if the data format is hexadecimal.
64 *
65 * cid ::
66 * A structure which holds the information about
67 * the current font.
68 *
69 * num_dict ::
70 * The number of font dictionaries.
71 */
72 typedef struct CID_Parser_
73 {
74 PS_ParserRec root;
75 FT_Stream stream;
76
77 FT_Byte* postscript;
78 FT_ULong postscript_len;
79
80 FT_ULong data_offset;
81
82 FT_ULong binary_length;
83
84 CID_FaceInfo cid;
85 FT_UInt num_dict;
86
87 } CID_Parser;
88
89
90 FT_LOCAL( FT_Error )
91 cid_parser_new( CID_Parser* parser,
92 FT_Stream stream,
93 FT_Memory memory,
94 PSAux_Service psaux );
95
96 FT_LOCAL( void )
97 cid_parser_done( CID_Parser* parser );
98
99
100 /**************************************************************************
101 *
102 * PARSING ROUTINES
103 *
104 */
105
106#define cid_parser_skip_spaces( p ) \
107 (p)->root.funcs.skip_spaces( &(p)->root )
108#define cid_parser_skip_PS_token( p ) \
109 (p)->root.funcs.skip_PS_token( &(p)->root )
110
111#define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root )
112#define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
113
114#define cid_parser_to_coord_array( p, m, c ) \
115 (p)->root.funcs.to_coord_array( &(p)->root, m, c )
116#define cid_parser_to_fixed_array( p, m, f, t ) \
117 (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
118#define cid_parser_to_token( p, t ) \
119 (p)->root.funcs.to_token( &(p)->root, t )
120#define cid_parser_to_token_array( p, t, m, c ) \
121 (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
122
123#define cid_parser_load_field( p, f, o ) \
124 (p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
125#define cid_parser_load_field_table( p, f, o ) \
126 (p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
127
128
129FT_END_HEADER
130
131#endif /* CIDPARSE_H_ */
132
133
134/* END */