ReactOS
0.4.16-dev-2380-gf63df20
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-2020 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 CIDPARSE_H_
20
#define CIDPARSE_H_
21
22
23
#include <
freetype/internal/t1types.h
>
24
#include <
freetype/internal/ftstream.h
>
25
#include <
freetype/internal/psaux.h
>
26
27
28
FT_BEGIN_HEADER
29
30
31
/**************************************************************************
32
*
33
* @Struct:
34
* CID_Parser
35
*
36
* @Description:
37
* A CID_Parser is an object used to parse a Type 1 fonts very
38
* quickly.
39
*
40
* @Fields:
41
* root ::
42
* The root PS_ParserRec fields.
43
*
44
* stream ::
45
* The current input stream.
46
*
47
* postscript ::
48
* A pointer to the data to be parsed.
49
*
50
* postscript_len ::
51
* The length of the data to be parsed.
52
*
53
* data_offset ::
54
* The start position of the binary data (i.e., the
55
* end of the data to be parsed.
56
*
57
* binary_length ::
58
* The length of the data after the `StartData'
59
* command if the data format is hexadecimal.
60
*
61
* cid ::
62
* A structure which holds the information about
63
* the current font.
64
*
65
* num_dict ::
66
* The number of font dictionaries.
67
*/
68
typedef
struct
CID_Parser_
69
{
70
PS_ParserRec
root
;
71
FT_Stream
stream
;
72
73
FT_Byte
*
postscript
;
74
FT_ULong
postscript_len
;
75
76
FT_ULong
data_offset
;
77
78
FT_ULong
binary_length
;
79
80
CID_FaceInfo
cid
;
81
FT_Int
num_dict
;
82
83
}
CID_Parser
;
84
85
86
FT_LOCAL
(
FT_Error
)
87
cid_parser_new
(
CID_Parser
*
parser
,
88
FT_Stream
stream
,
89
FT_Memory
memory
,
90
PSAux_Service
psaux );
91
92
FT_LOCAL
(
void
)
93
cid_parser_done
(
CID_Parser
*
parser
);
94
95
96
/**************************************************************************
97
*
98
* PARSING ROUTINES
99
*
100
*/
101
102
#define cid_parser_skip_spaces( p ) \
103
(p)->root.funcs.skip_spaces( &(p)->root )
104
#define cid_parser_skip_PS_token( p ) \
105
(p)->root.funcs.skip_PS_token( &(p)->root )
106
107
#define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root )
108
#define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
109
110
#define cid_parser_to_coord_array( p, m, c ) \
111
(p)->root.funcs.to_coord_array( &(p)->root, m, c )
112
#define cid_parser_to_fixed_array( p, m, f, t ) \
113
(p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
114
#define cid_parser_to_token( p, t ) \
115
(p)->root.funcs.to_token( &(p)->root, t )
116
#define cid_parser_to_token_array( p, t, m, c ) \
117
(p)->root.funcs.to_token_array( &(p)->root, t, m, c )
118
119
#define cid_parser_load_field( p, f, o ) \
120
(p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
121
#define cid_parser_load_field_table( p, f, o ) \
122
(p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
123
124
125
FT_END_HEADER
126
127
#endif
/* CIDPARSE_H_ */
128
129
130
/* END */
cid_parser_new
cid_parser_new(CID_Parser *parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux)
Definition:
cidparse.c:56
CID_Parser
FT_BEGIN_HEADER struct CID_Parser_ CID_Parser
cid_parser_done
cid_parser_done(CID_Parser *parser)
Definition:
cidparse.c:262
FT_LOCAL
#define FT_LOCAL(x)
Definition:
compiler-macros.h:186
FT_END_HEADER
#define FT_END_HEADER
Definition:
ftheader.h:57
FT_BEGIN_HEADER
#define FT_BEGIN_HEADER
Definition:
ftheader.h:37
ftstream.h
FT_Memory
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition:
ftsystem.h:64
FT_ULong
unsigned long FT_ULong
Definition:
fttypes.h:253
FT_Byte
unsigned char FT_Byte
Definition:
fttypes.h:154
FT_Error
int FT_Error
Definition:
fttypes.h:299
FT_Int
signed int FT_Int
Definition:
fttypes.h:220
memory
static char memory[1024 *256]
Definition:
process.c:122
psaux.h
CID_FaceInfoRec_
Definition:
t1tables.h:401
CID_Parser_
Definition:
cidparse.h:69
CID_Parser_::root
PS_ParserRec root
Definition:
cidparse.h:70
CID_Parser_::postscript
FT_Byte * postscript
Definition:
cidparse.h:73
CID_Parser_::num_dict
FT_Int num_dict
Definition:
cidparse.h:81
CID_Parser_::stream
FT_Stream stream
Definition:
cidparse.h:71
CID_Parser_::data_offset
FT_ULong data_offset
Definition:
cidparse.h:76
CID_Parser_::cid
CID_FaceInfo cid
Definition:
cidparse.h:80
CID_Parser_::postscript_len
FT_ULong postscript_len
Definition:
cidparse.h:74
CID_Parser_::binary_length
FT_ULong binary_length
Definition:
cidparse.h:78
FT_StreamRec_
Definition:
ftsystem.h:328
PSAux_ServiceRec_
Definition:
psaux.h:1345
PS_ParserRec_
Definition:
psaux.h:465
parser
Definition:
import.c:81
stream
Definition:
parse.h:23
t1types.h
sdk
lib
3rdparty
freetype
src
cid
cidparse.h
Generated on Tue Mar 17 2026 06:16:01 for ReactOS by
1.9.6