ReactOS 0.4.16-dev-2357-g35d0dfe
t1parse.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * t1parse.h
4 *
5 * Type 1 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 T1PARSE_H_
20#define T1PARSE_H_
21
22
25
26
28
29
30 /**************************************************************************
31 *
32 * @Struct:
33 * T1_ParserRec
34 *
35 * @Description:
36 * A PS_ParserRec is an object used to parse a Type 1 fonts very
37 * quickly.
38 *
39 * @Fields:
40 * root ::
41 * The root parser.
42 *
43 * stream ::
44 * The current input stream.
45 *
46 * base_dict ::
47 * A pointer to the top-level dictionary.
48 *
49 * base_len ::
50 * The length in bytes of the top dictionary.
51 *
52 * private_dict ::
53 * A pointer to the private dictionary.
54 *
55 * private_len ::
56 * The length in bytes of the private dictionary.
57 *
58 * in_pfb ::
59 * A boolean. Indicates that we are handling a PFB
60 * file.
61 *
62 * in_memory ::
63 * A boolean. Indicates a memory-based stream.
64 *
65 * single_block ::
66 * A boolean. Indicates that the private dictionary
67 * is stored in lieu of the base dictionary.
68 */
69 typedef struct T1_ParserRec_
70 {
73
76
79
83
85
86
87#define T1_Add_Table( p, i, o, l ) (p)->funcs.add( (p), i, o, l )
88#define T1_Release_Table( p ) \
89 do \
90 { \
91 if ( (p)->funcs.release ) \
92 (p)->funcs.release( p ); \
93 } while ( 0 )
94
95
96#define T1_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
97#define T1_Skip_PS_Token( p ) (p)->root.funcs.skip_PS_token( &(p)->root )
98
99#define T1_ToInt( p ) (p)->root.funcs.to_int( &(p)->root )
100#define T1_ToFixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
101
102#define T1_ToCoordArray( p, m, c ) \
103 (p)->root.funcs.to_coord_array( &(p)->root, m, c )
104#define T1_ToFixedArray( p, m, f, t ) \
105 (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
106#define T1_ToToken( p, t ) \
107 (p)->root.funcs.to_token( &(p)->root, t )
108#define T1_ToTokenArray( p, t, m, c ) \
109 (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
110
111#define T1_Load_Field( p, f, o, m, pf ) \
112 (p)->root.funcs.load_field( &(p)->root, f, o, m, pf )
113
114#define T1_Load_Field_Table( p, f, o, m, pf ) \
115 (p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf )
116
117
122 PSAux_Service psaux );
123
126 PSAux_Service psaux );
127
128 FT_LOCAL( void )
130
131
133
134#endif /* T1PARSE_H_ */
135
136
137/* END */
#define FT_LOCAL(x)
#define FT_END_HEADER
Definition: ftheader.h:57
#define FT_BEGIN_HEADER
Definition: ftheader.h:37
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
unsigned long FT_ULong
Definition: fttypes.h:253
unsigned char FT_Byte
Definition: fttypes.h:154
int FT_Error
Definition: fttypes.h:299
static char memory[1024 *256]
Definition: process.c:122
FT_Stream stream
Definition: t1parse.h:72
FT_Bool in_memory
Definition: t1parse.h:81
FT_ULong private_len
Definition: t1parse.h:78
FT_Bool single_block
Definition: t1parse.h:82
FT_ULong base_len
Definition: t1parse.h:75
FT_Byte * private_dict
Definition: t1parse.h:77
FT_Bool in_pfb
Definition: t1parse.h:80
FT_Byte * base_dict
Definition: t1parse.h:74
PS_ParserRec root
Definition: t1parse.h:71
Definition: import.c:81
Definition: parse.h:23
T1_Finalize_Parser(T1_Parser parser)
Definition: t1parse.c:243
T1_New_Parser(T1_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux)
Definition: t1parse.c:135
FT_BEGIN_HEADER struct T1_ParserRec_ * T1_Parser
FT_BEGIN_HEADER struct T1_ParserRec_ T1_ParserRec
T1_Get_Private_Dict(T1_Parser parser, PSAux_Service psaux)
Definition: t1parse.c:260