25#include FT_INTERNAL_OBJECTS_H
26#include FT_INTERNAL_TYPE1_TYPES_H
27#include FT_INTERNAL_HASH_H
28#include FT_INTERNAL_TRUETYPE_TYPES_H
29#include FT_SERVICE_POSTSCRIPT_CMAPS_H
30#include FT_INTERNAL_CFF_TYPES_H
31#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
264#define T1_FIELD_DICT_FONTDICT ( 1 << 0 )
265#define T1_FIELD_DICT_PRIVATE ( 1 << 1 )
269#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname, _dict ) \
271 _ident, T1CODE, _type, \
273 FT_FIELD_OFFSET( _fname ), \
274 FT_FIELD_SIZE( _fname ), \
279#define T1_NEW_CALLBACK_FIELD( _ident, _reader, _dict ) \
281 _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \
282 (T1_Field_ParseFunc)_reader, \
288#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max, _dict ) \
290 _ident, T1CODE, _type, \
292 FT_FIELD_OFFSET( _fname ), \
293 FT_FIELD_SIZE_DELTA( _fname ), \
295 FT_FIELD_OFFSET( num_ ## _fname ), \
299#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max, _dict ) \
301 _ident, T1CODE, _type, \
303 FT_FIELD_OFFSET( _fname ), \
304 FT_FIELD_SIZE_DELTA( _fname ), \
310#define T1_FIELD_BOOL( _ident, _fname, _dict ) \
311 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname, _dict )
313#define T1_FIELD_NUM( _ident, _fname, _dict ) \
314 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname, _dict )
316#define T1_FIELD_FIXED( _ident, _fname, _dict ) \
317 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname, _dict )
319#define T1_FIELD_FIXED_1000( _ident, _fname, _dict ) \
320 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname, \
323#define T1_FIELD_STRING( _ident, _fname, _dict ) \
324 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname, _dict )
326#define T1_FIELD_KEY( _ident, _fname, _dict ) \
327 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname, _dict )
329#define T1_FIELD_BBOX( _ident, _fname, _dict ) \
330 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname, _dict )
333#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax, _dict ) \
334 T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
335 _fname, _fmax, _dict )
337#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax, _dict ) \
338 T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
339 _fname, _fmax, _dict )
341#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax, _dict ) \
342 T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
343 _fname, _fmax, _dict )
345#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax, _dict ) \
346 T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
347 _fname, _fmax, _dict )
349#define T1_FIELD_CALLBACK( _ident, _name, _dict ) \
350 T1_NEW_CALLBACK_FIELD( _ident, _name, _dict )
568#define PS_MAX_OPERANDS 48
569#define PS_MAX_SUBRS_CALLS 16
825#define T1_MAX_SUBRS_CALLS 8
833#define T1_MAX_CHARSTRINGS_OPERANDS 32
872#ifdef T1_CONFIG_OPTION_OLD_ENGINE
1082#define CFF_MAX_OPERANDS 48
1083#define CFF_MAX_SUBRS_CALLS 16
1089#define CFF_MAX_TRANS_ELEMENTS 32
1168#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
1325#define IS_PS_NEWLINE( ch ) \
1329#define IS_PS_SPACE( ch ) \
1331 IS_PS_NEWLINE( ch ) || \
1336#define IS_PS_SPECIAL( ch ) \
1338 (ch) == '(' || (ch) == ')' || \
1339 (ch) == '<' || (ch) == '>' || \
1340 (ch) == '[' || (ch) == ']' || \
1341 (ch) == '{' || (ch) == '}' || \
1344#define IS_PS_DELIM( ch ) \
1345 ( IS_PS_SPACE( ch ) || \
1346 IS_PS_SPECIAL( ch ) )
1348#define IS_PS_DIGIT( ch ) \
1349 ( (ch) >= '0' && (ch) <= '9' )
1351#define IS_PS_XDIGIT( ch ) \
1352 ( IS_PS_DIGIT( ch ) || \
1353 ( (ch) >= 'A' && (ch) <= 'F' ) || \
1354 ( (ch) >= 'a' && (ch) <= 'f' ) )
1356#define IS_PS_BASE85( ch ) \
1357 ( (ch) >= '!' && (ch) <= 'u' )
1359#define IS_PS_TOKEN( cur, limit, token ) \
1360 ( (char)(cur)[0] == (token)[0] && \
1361 ( (cur) + sizeof ( (token) ) == (limit) || \
1362 ( (cur) + sizeof( (token) ) < (limit) && \
1363 IS_PS_DELIM( (cur)[sizeof ( (token) ) - 1] ) ) ) && \
1364 ft_strncmp( (char*)(cur), (token), sizeof ( (token) ) - 1 ) == 0 )
static unsigned char bytes[4]
static HRESULT get_callback(IBindCtx *pbc, IBindStatusCallback **callback)
#define T1_MAX_CHARSTRINGS_OPERANDS
#define T1_MAX_SUBRS_CALLS
enum FT_Render_Mode_ FT_Render_Mode
FT_BEGIN_HEADER typedef signed long FT_Pos
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLsizei const GLvoid * pointer
GLboolean GLenum GLenum GLvoid * values
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
static const CLSID * objects[]
static IPrintDialogCallback callback
static char memory[1024 *256]
FT_Error(* CFF_Builder_Start_Point_Func)(CFF_Builder *builder, FT_Pos x, FT_Pos y)
FT_Error(* CFF_Builder_Check_Points_Func)(CFF_Builder *builder, FT_Int count)
struct T1_Decoder_ZoneRec_ T1_Decoder_ZoneRec
FT_Error(* T1_Decoder_Callback)(T1_Decoder decoder, FT_UInt glyph_index)
struct CFF_Decoder_FuncsRec_ CFF_Decoder_FuncsRec
const struct CFF_Builder_FuncsRec_ * CFF_Builder_Funcs
struct PSAux_ServiceRec_ PSAux_ServiceRec
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
void(* CFF_Builder_Close_Contour_Func)(CFF_Builder *builder)
struct T1_DecoderRec_ * T1_Decoder
struct T1_TokenRec_ T1_TokenRec
struct PS_Builder_FuncsRec_ PS_Builder_FuncsRec
struct T1_FieldRec_ T1_FieldRec
const struct PS_Builder_FuncsRec_ * PS_Builder_Funcs
PSAux_ServiceRec PSAux_Interface
const struct T1_Builder_FuncsRec_ * T1_Builder_Funcs
struct T1_Decoder_ZoneRec_ * T1_Decoder_Zone
#define CFF_MAX_SUBRS_CALLS
struct PS_Parser_FuncsRec_ PS_Parser_FuncsRec
struct T1_BuilderRec_ * T1_Builder
const struct T1_CMap_ClassesRec_ * T1_CMap_Classes
enum T1_FieldType_ T1_FieldType
void(* T1_Builder_Close_Contour_Func)(T1_Builder builder)
struct PS_Decoder_ PS_Decoder
FT_BEGIN_HEADER struct PS_DriverRec_ PS_DriverRec
FT_Error(* T1_Builder_Check_Points_Func)(T1_Builder builder, FT_Int count)
struct T1_BuilderRec_ T1_BuilderRec
void(* CFF_Builder_Add_Point_Func)(CFF_Builder *builder, FT_Pos x, FT_Pos y, FT_Byte flag)
FT_Error(* CFF_Builder_Add_Contour_Func)(CFF_Builder *builder)
struct AFM_ParserRec_ * AFM_Parser
struct CFF_Builder_FuncsRec_ CFF_Builder_FuncsRec
FT_Error(* CFF_Decoder_Get_Glyph_Callback)(TT_Face face, FT_UInt glyph_index, FT_Byte **pointer, FT_ULong *length)
void(* T1_Field_ParseFunc)(FT_Face face, FT_Pointer parser)
FT_Error(* CFF_Builder_Add_Point1_Func)(CFF_Builder *builder, FT_Pos x, FT_Pos y)
struct PSAux_ServiceRec_ * PSAux_Service
enum T1_FieldLocation_ T1_FieldLocation
@ T1_FIELD_TYPE_INTEGER_ARRAY
@ T1_FIELD_TYPE_FIXED_1000
@ T1_FIELD_TYPE_FIXED_ARRAY
struct PS_Decoder_Zone_ PS_Decoder_Zone
enum T1_ParseState_ T1_ParseState
struct T1_CMap_ClassesRec_ T1_CMap_ClassesRec
void(* CFF_Decoder_Free_Glyph_Callback)(TT_Face face, FT_Byte **pointer, FT_ULong length)
struct CFF_Decoder_Zone_ CFF_Decoder_Zone
struct AFM_Parser_FuncsRec_ AFM_Parser_FuncsRec
struct T1_TokenRec_ * T1_Token
struct T1_Decoder_FuncsRec_ T1_Decoder_FuncsRec
struct T1_DecoderRec_ T1_DecoderRec
void(* T1_Builder_Add_Point_Func)(T1_Builder builder, FT_Pos x, FT_Pos y, FT_Byte flag)
FT_Error(* T1_Builder_Add_Contour_Func)(T1_Builder builder)
#define CFF_MAX_TRANS_ELEMENTS
struct PS_ParserRec_ * PS_Parser
struct PS_TableRec_ * PS_Table
const struct PS_Parser_FuncsRec_ * PS_Parser_Funcs
const struct CFF_Decoder_FuncsRec_ * CFF_Decoder_Funcs
#define PS_MAX_SUBRS_CALLS
struct CFF_Decoder_ CFF_Decoder
struct PS_ParserRec_ PS_ParserRec
FT_Error(* T1_Builder_Start_Point_Func)(T1_Builder builder, FT_Pos x, FT_Pos y)
struct AFM_ParserRec_ AFM_ParserRec
const struct T1_Decoder_FuncsRec_ * T1_Decoder_Funcs
const struct PS_Table_FuncsRec_ * PS_Table_Funcs
struct PS_Table_FuncsRec_ PS_Table_FuncsRec
enum T1_TokenType_ T1_TokenType
struct T1_Builder_FuncsRec_ T1_Builder_FuncsRec
FT_Error(* T1_Builder_Add_Point1_Func)(T1_Builder builder, FT_Pos x, FT_Pos y)
struct AFM_StreamRec_ * AFM_Stream
struct PS_TableRec_ PS_TableRec
@ T1_FIELD_LOCATION_FONT_EXTRA
@ T1_FIELD_LOCATION_BLEND
@ T1_FIELD_LOCATION_CID_INFO
@ T1_FIELD_LOCATION_PRIVATE
@ T1_FIELD_LOCATION_LOADER
@ T1_FIELD_LOCATION_FONT_INFO
@ T1_FIELD_LOCATION_FONT_DICT
struct T1_FieldRec_ * T1_Field
FT_Int(* get_index)(const char *name, FT_Offset len, void *user_data)
FT_Error(* init)(AFM_Parser parser, FT_Memory memory, FT_Byte *base, FT_Byte *limit)
FT_Error(* parse)(AFM_Parser parser)
void(* done)(AFM_Parser parser)
CFF_Builder_Check_Points_Func check_points
CFF_Builder_Add_Point_Func add_point
CFF_Builder_Add_Contour_Func add_contour
void(* init)(CFF_Builder *builder, TT_Face face, CFF_Size size, CFF_GlyphSlot glyph, FT_Bool hinting)
CFF_Builder_Close_Contour_Func close_contour
CFF_Builder_Add_Point1_Func add_point1
CFF_Builder_Start_Point_Func start_point
void(* done)(CFF_Builder *builder)
CFF_Builder_FuncsRec funcs
FT_Error(* prepare)(CFF_Decoder *decoder, CFF_Size size, FT_UInt glyph_index)
FT_Error(* parse_charstrings)(PS_Decoder *decoder, FT_Byte *charstring_base, FT_ULong charstring_len)
void(* init)(CFF_Decoder *decoder, TT_Face face, CFF_Size size, CFF_GlyphSlot slot, FT_Bool hinting, FT_Render_Mode hint_mode, CFF_Decoder_Get_Glyph_Callback get_callback, CFF_Decoder_Free_Glyph_Callback free_callback)
FT_Vector flex_vectors[7]
CFF_Decoder_Get_Glyph_Callback get_glyph_callback
FT_Fixed buildchar[CFF_MAX_TRANS_ELEMENTS]
CFF_Decoder_Zone zones[CFF_MAX_SUBRS_CALLS+1]
CFF_Decoder_Free_Glyph_Callback free_glyph_callback
CFF_SubFont current_subfont
void(* ps_decoder_init)(PS_Decoder *ps_decoder, void *decoder, FT_Bool is_t1)
FT_UInt32(* cff_random)(FT_UInt32 r)
const T1_Builder_FuncsRec * t1_builder_funcs
T1_CMap_Classes t1_cmap_classes
void(* t1_make_subfont)(FT_Face face, PS_Private priv, CFF_SubFont subfont)
const T1_Decoder_FuncsRec * t1_decoder_funcs
void(* t1_decrypt)(FT_Byte *buffer, FT_Offset length, FT_UShort seed)
const AFM_Parser_FuncsRec * afm_parser_funcs
const PS_Parser_FuncsRec * ps_parser_funcs
const CFF_Decoder_FuncsRec * cff_decoder_funcs
const PS_Table_FuncsRec * ps_table_funcs
void(* init)(PS_Builder *ps_builder, void *builder, FT_Bool is_t1)
void(* done)(PS_Builder *builder)
PS_Builder_FuncsRec funcs
FT_Generic * cf2_instance
CFF_SubFont current_subfont
CFF_Decoder_Get_Glyph_Callback get_glyph_callback
PS_Decoder_Zone zones[PS_MAX_SUBRS_CALLS+1]
FT_Vector flex_vectors[7]
CFF_Decoder_Free_Glyph_Callback free_glyph_callback
FT_Service_PsCMaps psnames
FT_Bool no_stem_darkening
void(* to_token)(PS_Parser parser, T1_Token token)
FT_Error(* load_field_table)(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
FT_Long(* to_int)(PS_Parser parser)
FT_Error(* to_bytes)(PS_Parser parser, FT_Byte *bytes, FT_Offset max_bytes, FT_ULong *pnum_bytes, FT_Bool delimiters)
void(* skip_spaces)(PS_Parser parser)
FT_Error(* load_field)(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
void(* skip_PS_token)(PS_Parser parser)
void(* done)(PS_Parser parser)
FT_Int(* to_fixed_array)(PS_Parser parser, FT_Int max_values, FT_Fixed *values, FT_Int power_ten)
void(* init)(PS_Parser parser, FT_Byte *base, FT_Byte *limit, FT_Memory memory)
FT_Int(* to_coord_array)(PS_Parser parser, FT_Int max_coords, FT_Short *coords)
FT_Fixed(* to_fixed)(PS_Parser parser, FT_Int power_ten)
void(* to_token_array)(PS_Parser parser, T1_Token tokens, FT_UInt max_tokens, FT_Int *pnum_tokens)
FT_Error(* add)(PS_Table table, FT_Int idx, void *object, FT_UInt length)
FT_Error(* init)(PS_Table table, FT_Int count, FT_Memory memory)
void(* release)(PS_Table table)
void(* done)(PS_Table table)
T1_Builder_FuncsRec funcs
T1_ParseState parse_state
T1_Builder_Check_Points_Func check_points
T1_Builder_Add_Point1_Func add_point1
void(* init)(T1_Builder builder, FT_Face face, FT_Size size, FT_GlyphSlot slot, FT_Bool hinting)
T1_Builder_Add_Point_Func add_point
T1_Builder_Start_Point_Func start_point
void(* done)(T1_Builder builder)
T1_Builder_Close_Contour_Func close_contour
T1_Builder_Add_Contour_Func add_contour
FT_Vector flex_vectors[7]
T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS+1]
T1_Decoder_FuncsRec funcs
T1_Decoder_Callback parse_callback
FT_Service_PsCMaps psnames
void(* done)(T1_Decoder decoder)
FT_Error(* parse_charstrings)(PS_Decoder *decoder, FT_Byte *charstring_base, FT_ULong charstring_len)
FT_Error(* parse_metrics)(T1_Decoder decoder, FT_Byte *base, FT_UInt len)
FT_Error(* init)(T1_Decoder decoder, FT_Face face, FT_Size size, FT_GlyphSlot slot, FT_Byte **glyph_names, PS_Blend blend, FT_Bool hinting, FT_Render_Mode hint_mode, T1_Decoder_Callback callback)
T1_FieldLocation location
T1_Field_ParseFunc reader