33#define FT_COMPONENT t42
59#define FT_STRUCTURE T1_FontInfo
61#define T1CODE T1_FIELD_LOCATION_FONT_INFO
71 T1_FIELD_NUM (
"UnderlineThickness", underline_thickness, 0 )
74#define FT_STRUCTURE PS_FontExtraRec
76#define T1CODE T1_FIELD_LOCATION_FONT_EXTRA
81#define FT_STRUCTURE T1_FontRec
83#define T1CODE T1_FIELD_LOCATION_FONT_DICT
91#define FT_STRUCTURE FT_BBox
93#define T1CODE T1_FIELD_LOCATION_BBOX
106#define T1_Add_Table( p, i, o, l ) (p)->funcs.add( (p), i, o, l )
107#define T1_Release_Table( p ) \
110 if ( (p)->funcs.release ) \
111 (p)->funcs.release( p ); \
114#define T1_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
115#define T1_Skip_PS_Token( p ) (p)->root.funcs.skip_PS_token( &(p)->root )
117#define T1_ToInt( p ) \
118 (p)->root.funcs.to_int( &(p)->root )
119#define T1_ToBytes( p, b, m, n, d ) \
120 (p)->root.funcs.to_bytes( &(p)->root, b, m, n, d )
122#define T1_ToFixedArray( p, m, f, t ) \
123 (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
124#define T1_ToToken( p, t ) \
125 (p)->root.funcs.to_token( &(p)->root, t )
127#define T1_Load_Field( p, f, o, m, pf ) \
128 (p)->root.funcs.load_field( &(p)->root, f, o, m, pf )
129#define T1_Load_Field_Table( p, f, o, m, pf ) \
130 (p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf )
229 if (
parser->root.funcs.done )
237 return (
c ==
' ' ||
c ==
'\t' ||
238 c ==
'\r' ||
c ==
'\n' ||
c ==
'\f' ||
265 if ( temp_scale == 0 )
267 FT_ERROR((
"t42_parse_font_matrix: invalid font matrix\n" ));
273 if ( temp_scale != 0x10000L )
280 temp[3] =
temp[3] < 0 ? -0x10000L : 0x10000L;
290 FT_ERROR((
"t42_parse_font_matrix: invalid font matrix\n" ));
316 FT_ERROR((
"t42_parse_encoding: out of bounds\n" ));
347 FT_ERROR((
"t42_parse_encoding: invalid encoding array size\n" ));
357 if ( encode->char_index )
409 if (
cur[1] ==
'e' &&
431 if ( only_immediates )
472 else if ( only_immediates )
505 ft_strncmp( (
const char*)
cur,
"StandardEncoding", 16 ) == 0 )
513 ft_strncmp( (
const char*)
cur,
"ISOLatin1Encoding", 17 ) == 0 )
543 FT_ULong n, string_size, old_string_size, real_size;
568 FT_ERROR((
"t42_parse_sfnts: can't find begin of sfnts vector\n" ));
592 else if ( *
cur ==
'<' )
594 if ( string_buf && !allocated )
597 "can't handle mixed binary and hex strings\n" ));
610 FT_ERROR((
"t42_parse_sfnts: invalid data in sfnts array\n" ));
614 if (
FT_REALLOC( string_buf, old_string_size, string_size ) )
621 old_string_size = string_size;
622 string_size = real_size;
633 "can't handle mixed binary and hex strings\n" ));
641 FT_ERROR((
"t42_parse_sfnts: invalid string size\n" ));
652 string_buf =
parser->root.cursor + 1;
656 FT_ERROR((
"t42_parse_sfnts: too much binary data\n" ));
661 parser->root.cursor += string_size + 1;
666 FT_ERROR((
"t42_parse_sfnts: invalid data in sfnts array\n" ));
673 if ( ( string_size & 1 ) && string_buf[string_size - 1] == 0 )
678 FT_ERROR((
"t42_parse_sfnts: invalid string\n" ));
688 for (
n = 0;
n < string_size;
n++ )
701 num_tables = 16 *
face->ttf_data[4] +
face->ttf_data[5];
703 face->ttf_size = 12 + 16 * num_tables;
707 FT_ERROR((
"t42_parse_sfnts: invalid data in sfnts array\n" ));
719 if ( count < face->ttf_size )
730 for (
i = 0;
i < num_tables;
i++ )
740 " invalid data in sfnts array\n" ));
752 face->ttf_size + 1 ) )
761 FT_ERROR((
"t42_parse_sfnts: too much binary data\n" ));
808 FT_ERROR((
"t42_parse_charstrings: out of bounds\n" ));
820 FT_ERROR((
"t42_parse_encoding: invalid number of glyphs\n" ));
828 FT_TRACE0((
"t42_parse_charstrings: adjusting number of glyphs"
829 " (from %d to %ld)\n",
836 else if ( *
parser->root.cursor ==
'<' )
851 if ( *
parser->root.cursor ==
'/' )
853 else if ( *
parser->root.cursor ==
'>' )
867 FT_ERROR((
"t42_parse_charstrings: invalid token\n" ));
874 FT_ERROR((
"t42_parse_charstrings: out of bounds\n" ));
882 if ( swap_table->
init )
885 " only one CharStrings array allowed\n" ));
940 FT_ERROR((
"t42_parse_charstrings: out of bounds\n" ));
947 if ( *
cur ==
'/' || *
cur ==
'(' )
953 if (
cur + ( have_literal ? 3 : 2 ) >=
limit )
955 FT_ERROR((
"t42_parse_charstrings: out of bounds\n" ));
975 (
const char*)(name_table->
elements[
n]) ) == 0 )
991 FT_ERROR((
"t42_parse_charstrings: out of bounds\n" ));
1012 if ( !notdef_found )
1014 FT_ERROR((
"t42_parse_charstrings: no /.notdef glyph\n" ));
1044 name_table->
elements[notdef_index],
1045 name_table->
lengths [notdef_index] );
1051 code_table->
elements[notdef_index],
1052 code_table->
lengths [notdef_index] );
1111 switch (
field->location )
1114 dummy_object = &
face->type1.font_info;
1118 dummy_object = &
face->type1.font_extra;
1122 dummy_object = &
face->type1.font_bbox;
1126 dummy_object = &
face->type1;
1208 cur2 =
parser->root.cursor;
1210 parser->root.cursor = cur2;
1228 if (
len > 0 && len < 22 && parser->
root.cursor <
limit )
1236 for (
i = 0;
i < n_keywords;
i++ )
1282 loader->num_glyphs = 0;
1283 loader->num_chars = 0;
1286 loader->encoding_table.init = 0;
1287 loader->charstrings.init = 0;
1288 loader->glyph_names.init = 0;
static const WCHAR version[]
FT_DivFix(FT_Long a, FT_Long b)
FT_Matrix_Check(const FT_Matrix *matrix)
#define FT_TRACE0(varformat)
#define FT_ERROR(varformat)
#define FT_TRACE6(varformat)
#define FT_TRACE2(varformat)
#define FT_REALLOC(ptr, cursz, newsz)
#define FT_NEW_ARRAY(ptr, count)
#define FT_SET_ERROR(expression)
#define FT_ALLOC(ptr, size)
#define FT_FRAME_ENTER(size)
#define FT_STREAM_SEEK(position)
#define FT_STREAM_SKIP(distance)
#define FT_STREAM_READ(buffer, count)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei count
GLenum GLuint GLint GLenum face
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 GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
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 char memory[1024 *256]
#define T1_FIELD_BOOL(_ident, _fname, _dict)
#define T1_FIELD_NUM(_ident, _fname, _dict)
#define T1_FIELD_FIXED(_ident, _fname, _dict)
#define T1_FIELD_KEY(_ident, _fname, _dict)
#define T1_FIELD_BBOX(_ident, _fname, _dict)
struct PSAux_ServiceRec_ * PSAux_Service
@ T1_FIELD_TYPE_INTEGER_ARRAY
@ T1_FIELD_TYPE_FIXED_ARRAY
#define T1_FIELD_STRING(_ident, _fname, _dict)
#define T1_FIELD_CALLBACK(_ident, _name, _dict)
@ T1_FIELD_LOCATION_FONT_EXTRA
@ T1_FIELD_LOCATION_CID_INFO
@ T1_FIELD_LOCATION_FONT_INFO
struct T1_FieldRec_ * T1_Field
const PS_Table_FuncsRec * ps_table_funcs
FT_Error(* init)(PS_Table table, FT_Int count, FT_Memory memory)
PS_TableRec encoding_table
@ T1_ENCODING_TYPE_ISOLATIN1
@ T1_ENCODING_TYPE_STANDARD
@ T1_ENCODING_TYPE_EXPERT
T1_FIELD_DICT_FONTDICT family_name
T1_FIELD_DICT_FONTDICT T1_FIELD_DICT_FONTDICT T1_FIELD_DICT_FONTDICT underline_position
T1_FIELD_DICT_FONTDICT T1_FIELD_DICT_FONTDICT italic_angle
FT_BEGIN_HEADER struct T1_EncodingRecRec_ * T1_Encoding
static void t42_parse_font_matrix(T42_Face face, T42_Loader loader)
t42_parse_dict(T42_Face face, T42_Loader loader, FT_Byte *base, FT_Long size)
static void t42_parse_encoding(T42_Face face, T42_Loader loader)
#define T1_ToBytes(p, b, m, n, d)
#define T1_ToFixedArray(p, m, f, t)
t42_parser_init(T42_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux)
#define T1_Add_Table(p, i, o, l)
#define T1_Release_Table(p)
#define T1_Skip_Spaces(p)
#define T1_Skip_PS_Token(p)
static void t42_parse_charstrings(T42_Face face, T42_Loader loader)
t42_loader_done(T42_Loader loader)
static void t42_parse_sfnts(T42_Face face, T42_Loader loader)
static int t42_is_space(FT_Byte c)
static const T1_FieldRec t42_keywords[]
t42_loader_init(T42_Loader loader, T42_Face face)
static FT_Error t42_load_keyword(T42_Face face, T42_Loader loader, T1_Field field)
#define T1_Load_Field(p, f, o, m, pf)
t42_parser_done(T42_Parser parser)
enum T42_Load_Status_ T42_Load_Status
#define T1_Load_Field_Table(p, f, o, m, pf)
FT_BEGIN_HEADER struct T42_ParserRec_ * T42_Parser
FT_BEGIN_HEADER struct T42_FaceRec_ * T42_Face