38#define FT_COMPONENT psobjs
86 table->init = 0xDEADBEEFUL;
131 table->block = old_base;
181 if ( idx < 0 || idx >=
table->max_elems )
183 FT_ERROR((
"ps_table_add: invalid index\n" ));
184 return FT_THROW( Invalid_Argument );
211 if ( in_offset >= 0 )
212 object =
table->block + in_offset;
335#define IS_OCTAL_DIGIT( c ) ( '0' <= (c) && (c) <= '7' )
438 FT_ERROR((
"skip_string: missing closing delimiter `>'\n" ));
533 if ( *
cur ==
'[' || *
cur ==
']' )
571 FT_ERROR((
"ps_parser_skip_PS_token:"
572 " unexpected closing delimiter `>'\n" ));
595 if ( cur < limit && cur == parser->
cursor )
597 FT_ERROR((
"ps_parser_skip_PS_token:"
598 " current token is `%c' which is self-delimiting\n"
600 " but invalid at this point\n",
680 while ( cur < limit && !parser->
error )
686 else if ( *
cur ==
']' )
770 parser->cursor = old_cursor;
771 parser->limit = old_limit;
835 if ( old_cur ==
cur )
915 if ( old_cur ==
cur )
973 else if ( *
cur ==
')' )
1072 parser->cursor = old_cur;
1073 parser->limit = old_limit;
1083 count = max_objects;
1087 if ( max_objects == 0 )
1129 switch (
field->size )
1140 *(FT_UInt32*)
q = (FT_UInt32)
val;
1178 " expected a name or string\n"
1180 " but found token of type %d instead\n",
1190 FT_TRACE0((
"ps_parser_load_field: overwriting field %s\n",
1202#ifdef FT_DEBUG_LEVEL_TRACE
1225 " expected four integers in bounding box\n" ));
1254 for (
i = 0;
i < 4;
i++ )
1257 temp +
i * max_objects, 0 );
1261 " expected %d integer%s in the %s subarray\n"
1263 " of /FontBBox in the /Blend dictionary\n",
1264 max_objects, max_objects > 1 ?
"s" :
"",
1266 : (
i == 1 ?
"second"
1267 : (
i == 2 ?
"third"
1279 for (
i = 0;
i < max_objects;
i++ )
1309 *pflags |= 1L <<
field->flag_bit;
1325#define T1_MAX_TABLE_ELEMENTS 32
1351 if ( num_elements < 0 )
1359 old_cursor =
parser->cursor;
1360 old_limit =
parser->limit;
1372 for ( ; num_elements > 0; num_elements--,
token++ )
1392 *pflags |= 1L <<
field->flag_bit;
1397 parser->cursor = old_cursor;
1398 parser->limit = old_limit;
1436 FT_ERROR((
"ps_parser_to_bytes: Missing starting delimiter `<'\n" ));
1453 if ( cur < parser->
limit && *
cur !=
'>' )
1455 FT_ERROR((
"ps_parser_to_bytes: Missing closing delimiter `>'\n" ));
1496 max_values,
values, power_ten );
1581 builder->load_points = 1;
1583 builder->face =
face;
1584 builder->glyph = glyph;
1585 builder->memory =
face->memory;
1592 builder->loader = loader;
1597 builder->hints_globals =
size->internal->module_data;
1598 builder->hints_funcs =
NULL;
1601 builder->hints_funcs = glyph->internal->glyph_hints;
1607 builder->left_bearing.x = 0;
1608 builder->left_bearing.y = 0;
1609 builder->advance.x = 0;
1610 builder->advance.y = 0;
1637 glyph->
outline = *builder->base;
1660 if ( builder->load_points )
1702 FT_ERROR((
"t1_builder_add_contour: no outline to add points to\n" ));
1703 return FT_THROW( Invalid_File_Format );
1706 if ( !builder->load_points )
1715 if (
outline->n_contours > 0 )
1784 if ( p1->
x == p2->
x && p1->
y == p2->
y )
1789 if (
outline->n_contours > 0 )
1846 builder->path_begun = 0;
1847 builder->load_points = 1;
1849 builder->face =
face;
1850 builder->glyph = glyph;
1851 builder->memory =
face->root.memory;
1858 builder->loader = loader;
1863 builder->hints_globals =
NULL;
1864 builder->hints_funcs =
NULL;
1866 if ( hinting &&
size )
1873 builder->hints_globals = (
void *)
internal->topfont;
1874 builder->hints_funcs = glyph->root.internal->glyph_hints;
1882 builder->left_bearing.x = 0;
1883 builder->left_bearing.y = 0;
1884 builder->advance.x = 0;
1885 builder->advance.y = 0;
1935 if ( builder->load_points )
1940#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
1988 if ( !builder->load_points )
1997 if (
outline->n_contours > 0 )
2018 if ( !builder->path_begun )
2020 builder->path_begun = 1;
2063 if ( p1->
x == p2->
x && p1->
y == p2->
y )
2068 if (
outline->n_contours > 0 )
2132 ps_builder->loader = t1builder->
loader;
2133 ps_builder->
base = t1builder->
base;
2134 ps_builder->current = t1builder->
current;
2136 ps_builder->pos_x = &t1builder->
pos_x;
2137 ps_builder->pos_y = &t1builder->
pos_y;
2140 ps_builder->advance = &t1builder->
advance;
2142 ps_builder->bbox = &t1builder->
bbox;
2143 ps_builder->path_begun = 0;
2145 ps_builder->no_recurse = t1builder->
no_recurse;
2156 ps_builder->glyph = cffbuilder->
glyph;
2157 ps_builder->loader = cffbuilder->
loader;
2158 ps_builder->
base = cffbuilder->
base;
2159 ps_builder->current = cffbuilder->
current;
2161 ps_builder->pos_x = &cffbuilder->
pos_x;
2162 ps_builder->pos_y = &cffbuilder->
pos_y;
2165 ps_builder->advance = &cffbuilder->
advance;
2167 ps_builder->bbox = &cffbuilder->
bbox;
2168 ps_builder->path_begun = cffbuilder->
path_begun;
2169 ps_builder->load_points = cffbuilder->
load_points;
2170 ps_builder->no_recurse = cffbuilder->
no_recurse;
2175 ps_builder->is_t1 = is_t1;
2224 if ( builder->load_points )
2229#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
2233 if ( !builder->is_t1 &&
2241#ifdef T1_CONFIG_OPTION_OLD_ENGINE
2242#ifndef CFF_CONFIG_OPTION_OLD_ENGINE
2245 if ( builder->is_t1 &&
2292 FT_ERROR((
"ps_builder_add_contour: no outline to add points to\n" ));
2293 return FT_THROW( Invalid_File_Format );
2296 if ( !builder->load_points )
2305 if (
outline->n_contours > 0 )
2326 if ( !builder->path_begun )
2328 builder->path_begun = 1;
2371 if ( p1->
x == p2->
x && p1->
y == p2->
y )
2376 if (
outline->n_contours > 0 )
2438 ps_decoder->psnames = t1_decoder->
psnames;
2440 ps_decoder->num_glyphs = t1_decoder->
num_glyphs;
2441 ps_decoder->glyph_names = t1_decoder->
glyph_names;
2442 ps_decoder->hint_mode = t1_decoder->
hint_mode;
2443 ps_decoder->blend = t1_decoder->
blend;
2446 ps_decoder->locals = t1_decoder->
subrs;
2447 ps_decoder->locals_len = t1_decoder->
subrs_len;
2448 ps_decoder->locals_hash = t1_decoder->
subrs_hash;
2450 ps_decoder->buildchar = t1_decoder->
buildchar;
2453 ps_decoder->lenIV = t1_decoder->
lenIV;
2464 ps_decoder->cff = cff_decoder->
cff;
2468 ps_decoder->num_globals = cff_decoder->
num_globals;
2469 ps_decoder->globals = cff_decoder->
globals;
2471 ps_decoder->num_locals = cff_decoder->
num_locals;
2472 ps_decoder->locals = cff_decoder->
locals;
2473 ps_decoder->locals_bias = cff_decoder->
locals_bias;
2475 ps_decoder->glyph_width = &cff_decoder->
glyph_width;
2476 ps_decoder->width_only = cff_decoder->
width_only;
2478 ps_decoder->hint_mode = cff_decoder->
hint_mode;
2532 cpriv->
lenIV = priv->lenIV;
2540 if (
face->internal->random_seed != -1 )
2544 subfont->
random = (FT_UInt32)
face->internal->random_seed;
2545 if (
face->internal->random_seed )
2550 (FT_UInt32)
face->internal->random_seed );
2552 }
while (
face->internal->random_seed < 0 );
2555 if ( !subfont->random )
2561 seed = (FT_UInt32)( (
FT_Offset)(
char*)&seed ^
2564 seed = seed ^ ( seed >> 10 ) ^ ( seed >> 20 );
2568 subfont->random = seed;
ios_base &_STLP_CALL internal(ios_base &__s)
static unsigned char bytes[4]
struct CFF_InternalRec_ * CFF_Internal
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
struct FT_FaceRec_ * FT_Face
#define FT_ASSERT(condition)
#define FT_TRACE0(varformat)
#define FT_ERROR(varformat)
#define FT_TRACE4(varformat)
#define FT_HINTING_FREETYPE
FT_GlyphLoader_Rewind(FT_GlyphLoader loader)
#define FT_GLYPHLOADER_CHECK_POINTS(_loader, _points, _contours)
#define FT_CURVE_TAG_CUBIC
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_NEW_ARRAY(ptr, count)
#define FT_ALLOC(ptr, size)
#define FT_OFFSET(base, count)
#define FT_MEM_COPY(dest, source, count)
#define FT_FACE_DRIVER(x)
#define FT_PAD_CEIL(x, n)
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
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble q
GLenum GLuint GLint GLenum face
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 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]
struct @1789::@1790 driver
#define IS_PS_NEWLINE(ch)
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
struct T1_DecoderRec_ * T1_Decoder
struct T1_BuilderRec_ * T1_Builder
enum T1_FieldType_ T1_FieldType
@ T1_FIELD_TYPE_FIXED_1000
@ T1_FIELD_TYPE_FIXED_ARRAY
struct T1_FieldRec_ * T1_Field
FT_CALLBACK_TABLE_DEF const CFF_Builder_FuncsRec cff_builder_funcs
FT_CALLBACK_TABLE_DEF const PS_Builder_FuncsRec ps_builder_funcs
FT_CALLBACK_TABLE_DEF const T1_Builder_FuncsRec t1_builder_funcs
FT_CALLBACK_TABLE_DEF const PS_Table_FuncsRec ps_table_funcs
FT_CALLBACK_TABLE_DEF const PS_Parser_FuncsRec ps_parser_funcs
PS_Conv_ToInt(FT_Byte **cursor, FT_Byte *limit)
PS_Conv_ToFixed(FT_Byte **cursor, FT_Byte *limit, FT_Long power_ten)
PS_Conv_EexecDecode(FT_Byte **cursor, FT_Byte *limit, FT_Byte *buffer, FT_Offset n, FT_UShort *seed)
PS_Conv_ASCIIHexDecode(FT_Byte **cursor, FT_Byte *limit, FT_Byte *buffer, FT_Offset n)
cff_builder_add_point1(CFF_Builder *builder, FT_Pos x, FT_Pos y)
ps_parser_skip_PS_token(PS_Parser parser)
static FT_Error skip_string(FT_Byte **acur, FT_Byte *limit)
t1_builder_close_contour(T1_Builder builder)
cff_builder_add_point(CFF_Builder *builder, FT_Pos x, FT_Pos y, FT_Byte flag)
ps_parser_to_fixed(PS_Parser parser, FT_Int power_ten)
ps_parser_to_token_array(PS_Parser parser, T1_Token tokens, FT_UInt max_tokens, FT_Int *pnum_tokens)
ps_builder_close_contour(PS_Builder *builder)
ps_builder_add_contour(PS_Builder *builder)
ps_decoder_init(PS_Decoder *ps_decoder, void *decoder, FT_Bool is_t1)
ps_builder_init(PS_Builder *ps_builder, void *builder, FT_Bool is_t1)
#define IS_OCTAL_DIGIT(c)
ps_parser_init(PS_Parser parser, FT_Byte *base, FT_Byte *limit, FT_Memory memory)
t1_builder_start_point(T1_Builder builder, FT_Pos x, FT_Pos y)
static FT_Error skip_literal_string(FT_Byte **acur, FT_Byte *limit)
t1_builder_init(T1_Builder builder, FT_Face face, FT_Size size, FT_GlyphSlot glyph, FT_Bool hinting)
#define T1_MAX_TABLE_ELEMENTS
ps_table_done(PS_Table table)
t1_builder_add_point1(T1_Builder builder, FT_Pos x, FT_Pos y)
cff_check_points(CFF_Builder *builder, FT_Int count)
static FT_Error reallocate_t1_table(PS_Table table, FT_Offset new_size)
t1_builder_check_points(T1_Builder builder, FT_Int count)
ps_parser_to_coord_array(PS_Parser parser, FT_Int max_coords, FT_Short *coords)
ps_table_release(PS_Table table)
ps_parser_load_field_table(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
ps_builder_add_point(PS_Builder *builder, FT_Pos x, FT_Pos y, FT_Byte flag)
static FT_Error skip_procedure(FT_Byte **acur, FT_Byte *limit)
ps_parser_to_int(PS_Parser parser)
ps_parser_to_token(PS_Parser parser, T1_Token token)
ps_parser_skip_spaces(PS_Parser parser)
static FT_Int ps_tofixedarray(FT_Byte **acur, FT_Byte *limit, FT_Int max_values, FT_Fixed *values, FT_Int power_ten)
t1_builder_done(T1_Builder builder)
cff_builder_start_point(CFF_Builder *builder, FT_Pos x, FT_Pos y)
ps_parser_to_bytes(PS_Parser parser, FT_Byte *bytes, FT_Offset max_bytes, FT_ULong *pnum_bytes, FT_Bool delimiters)
ps_table_new(PS_Table table, FT_Int count, FT_Memory memory)
t1_builder_add_point(T1_Builder builder, FT_Pos x, FT_Pos y, FT_Byte flag)
t1_decrypt(FT_Byte *buffer, FT_Offset length, FT_UShort seed)
t1_make_subfont(FT_Face face, PS_Private priv, CFF_SubFont subfont)
static FT_Int ps_tocoordarray(FT_Byte **acur, FT_Byte *limit, FT_Int max_coords, FT_Short *coords)
static void shift_elements(PS_Table table, FT_Byte *old_base)
t1_builder_add_contour(T1_Builder builder)
ps_parser_done(PS_Parser parser)
ps_builder_done(PS_Builder *builder)
ps_builder_add_point1(PS_Builder *builder, FT_Pos x, FT_Pos y)
ps_table_add(PS_Table table, FT_Int idx, const void *object, FT_UInt length)
static int ps_tobool(FT_Byte **acur, FT_Byte *limit)
cff_builder_done(CFF_Builder *builder)
cff_builder_init(CFF_Builder *builder, TT_Face face, CFF_Size size, CFF_GlyphSlot glyph, FT_Bool hinting)
cff_builder_add_contour(CFF_Builder *builder)
ps_parser_to_fixed_array(PS_Parser parser, FT_Int max_values, FT_Fixed *values, FT_Int power_ten)
cff_builder_close_contour(CFF_Builder *builder)
ps_builder_start_point(PS_Builder *builder, FT_Pos x, FT_Pos y)
static void skip_spaces(FT_Byte **acur, FT_Byte *limit)
ps_parser_load_field(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
static void skip_comment(FT_Byte **acur, FT_Byte *limit)
ps_builder_check_points(PS_Builder *builder, FT_Int count)
CFF_Decoder_Get_Glyph_Callback get_glyph_callback
CFF_Decoder_Free_Glyph_Callback free_glyph_callback
CFF_SubFont current_subfont
FT_Pos family_other_blues[10]
FT_Byte num_family_other_blues
FT_Fixed expansion_factor
FT_Size_Internal internal
FT_Service_PsCMaps psnames