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