sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
psobjs.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * psobjs.h
4 *
5 * Auxiliary functions for PostScript fonts (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 PSOBJS_H_
24#define PSOBJS_H_
25
26
29
30
31FT_BEGIN_HEADER
32
33
34 /*************************************************************************/
35 /*************************************************************************/
36 /***** *****/
37 /***** T1_TABLE *****/
38 /***** *****/
39 /*************************************************************************/
40 /*************************************************************************/
41
42
43 FT_CALLBACK_TABLE
44 const PS_Table_FuncsRec ps_table_funcs;
45
46 FT_CALLBACK_TABLE
47 const PS_Parser_FuncsRec ps_parser_funcs;
48
49 FT_CALLBACK_TABLE
50 const T1_Builder_FuncsRec t1_builder_funcs;
51
52
53 FT_LOCAL( FT_Error )
54 ps_table_new( PS_Table table,
55 FT_Int count,
56 FT_Memory memory );
57
58 FT_LOCAL( FT_Error )
59 ps_table_add( PS_Table table,
60 FT_Int idx,
61 const void* object,
62 FT_UInt length );
63
64 FT_LOCAL( void )
65 ps_table_done( PS_Table table );
66
67
68 FT_LOCAL( void )
69 ps_table_release( PS_Table table );
70
71
72 /*************************************************************************/
73 /*************************************************************************/
74 /***** *****/
75 /***** T1 PARSER *****/
76 /***** *****/
77 /*************************************************************************/
78 /*************************************************************************/
79
80
81 FT_LOCAL( void )
82 ps_parser_skip_spaces( PS_Parser parser );
83
84 FT_LOCAL( void )
85 ps_parser_skip_PS_token( PS_Parser parser );
86
87 FT_LOCAL( void )
88 ps_parser_to_token( PS_Parser parser,
89 T1_Token token );
90
91 FT_LOCAL( void )
92 ps_parser_to_token_array( PS_Parser parser,
93 T1_Token tokens,
94 FT_UInt max_tokens,
95 FT_Int* pnum_tokens );
96
97 FT_LOCAL( FT_Error )
98 ps_parser_load_field( PS_Parser parser,
99 const T1_Field field,
100 void** objects,
101 FT_UInt max_objects,
102 FT_ULong* pflags );
103
104 FT_LOCAL( FT_Error )
105 ps_parser_load_field_table( PS_Parser parser,
106 const T1_Field field,
107 void** objects,
108 FT_UInt max_objects,
109 FT_ULong* pflags );
110
111 FT_LOCAL( FT_Long )
112 ps_parser_to_int( PS_Parser parser );
113
114
115 FT_LOCAL( FT_Error )
116 ps_parser_to_bytes( PS_Parser parser,
117 FT_Byte* bytes,
118 FT_Offset max_bytes,
119 FT_ULong* pnum_bytes,
120 FT_Bool delimiters );
121
122
123 FT_LOCAL( FT_Fixed )
124 ps_parser_to_fixed( PS_Parser parser,
125 FT_Int power_ten );
126
127
128 FT_LOCAL( FT_Int )
129 ps_parser_to_coord_array( PS_Parser parser,
130 FT_Int max_coords,
131 FT_Short* coords );
132
133 FT_LOCAL( FT_Int )
134 ps_parser_to_fixed_array( PS_Parser parser,
135 FT_Int max_values,
136 FT_Fixed* values,
137 FT_Int power_ten );
138
139
140 FT_LOCAL( void )
141 ps_parser_init( PS_Parser parser,
142 FT_Byte* base,
143 FT_Byte* limit,
144 FT_Memory memory );
145
146 FT_LOCAL( void )
147 ps_parser_done( PS_Parser parser );
148
149
150 /*************************************************************************/
151 /*************************************************************************/
152 /***** *****/
153 /***** T1 BUILDER *****/
154 /***** *****/
155 /*************************************************************************/
156 /*************************************************************************/
157
158 FT_LOCAL( void )
159 t1_builder_init( T1_Builder builder,
160 FT_Face face,
161 FT_Size size,
162 FT_GlyphSlot glyph,
163 FT_Bool hinting );
164
165 FT_LOCAL( void )
166 t1_builder_done( T1_Builder builder );
167
168 FT_LOCAL( FT_Error )
169 t1_builder_check_points( T1_Builder builder,
170 FT_Int count );
171
172 FT_LOCAL( void )
173 t1_builder_add_point( T1_Builder builder,
174 FT_Pos x,
175 FT_Pos y,
176 FT_Byte flag );
177
178 FT_LOCAL( FT_Error )
179 t1_builder_add_point1( T1_Builder builder,
180 FT_Pos x,
181 FT_Pos y );
182
183 FT_LOCAL( FT_Error )
184 t1_builder_add_contour( T1_Builder builder );
185
186
187 FT_LOCAL( FT_Error )
188 t1_builder_start_point( T1_Builder builder,
189 FT_Pos x,
190 FT_Pos y );
191
192
193 FT_LOCAL( void )
194 t1_builder_close_contour( T1_Builder builder );
195
196
197 /*************************************************************************/
198 /*************************************************************************/
199 /***** *****/
200 /***** CFF BUILDER *****/
201 /***** *****/
202 /*************************************************************************/
203 /*************************************************************************/
204
205 FT_LOCAL( void )
206 cff_builder_init( CFF_Builder* builder,
207 TT_Face face,
208 CFF_Size size,
209 CFF_GlyphSlot glyph,
210 FT_Bool hinting );
211
212 FT_LOCAL( void )
213 cff_builder_done( CFF_Builder* builder );
214
215 FT_LOCAL( FT_Error )
216 cff_check_points( CFF_Builder* builder,
217 FT_Int count );
218
219 FT_LOCAL( void )
220 cff_builder_add_point( CFF_Builder* builder,
221 FT_Pos x,
222 FT_Pos y,
223 FT_Byte flag );
224 FT_LOCAL( FT_Error )
225 cff_builder_add_point1( CFF_Builder* builder,
226 FT_Pos x,
227 FT_Pos y );
228 FT_LOCAL( FT_Error )
229 cff_builder_start_point( CFF_Builder* builder,
230 FT_Pos x,
231 FT_Pos y );
232 FT_LOCAL( void )
233 cff_builder_close_contour( CFF_Builder* builder );
234
235 FT_LOCAL( FT_Error )
236 cff_builder_add_contour( CFF_Builder* builder );
237
238
239 /*************************************************************************/
240 /*************************************************************************/
241 /***** *****/
242 /***** PS BUILDER *****/
243 /***** *****/
244 /*************************************************************************/
245 /*************************************************************************/
246
247 FT_LOCAL( void )
248 ps_builder_init( PS_Builder* ps_builder,
249 void* builder,
250 FT_Bool is_t1 );
251
252
253 FT_LOCAL( void )
254 ps_builder_done( PS_Builder* builder );
255
256 FT_LOCAL( FT_Error )
257 ps_builder_check_points( PS_Builder* builder,
258 FT_Int count );
259
260 FT_LOCAL( void )
261 ps_builder_add_point( PS_Builder* builder,
262 FT_Pos x,
263 FT_Pos y,
264 FT_Byte flag );
265
266 FT_LOCAL( FT_Error )
267 ps_builder_add_point1( PS_Builder* builder,
268 FT_Pos x,
269 FT_Pos y );
270
271 FT_LOCAL( FT_Error )
272 ps_builder_add_contour( PS_Builder* builder );
273
274 FT_LOCAL( FT_Error )
275 ps_builder_start_point( PS_Builder* builder,
276 FT_Pos x,
277 FT_Pos y );
278
279 FT_LOCAL( void )
280 ps_builder_close_contour( PS_Builder* builder );
281
282
283 /*************************************************************************/
284 /*************************************************************************/
285 /***** *****/
286 /***** OTHER *****/
287 /***** *****/
288 /*************************************************************************/
289 /*************************************************************************/
290
291 FT_LOCAL( void )
292 ps_decoder_init( PS_Decoder* ps_decoder,
293 void* decoder,
294 FT_Bool is_t1 );
295
296 FT_LOCAL( void )
297 t1_make_subfont( FT_Face face,
298 PS_Private priv,
299 CFF_SubFont subfont );
300
301 FT_LOCAL( void )
302 t1_decrypt( FT_Byte* buffer,
303 FT_Offset length,
304 FT_UShort seed );
305
306
307 FT_LOCAL( FT_UInt32 )
308 cff_random( FT_UInt32 r );
309
310
311FT_END_HEADER
312
313#endif /* PSOBJS_H_ */
314
315
316/* END */