22 #include FT_INTERNAL_DEBUG_H
27 #define FT_COMPONENT trace_pfr
45 glyph->loader = loader;
46 glyph->path_begun = 0;
59 glyph->y_control =
NULL;
61 glyph->max_xy_control = 0;
63 glyph->num_x_control = 0;
64 glyph->num_y_control = 0;
73 glyph->path_begun = 0;
82 FT_Outline* outline = &loader->current.outline;
103 if ( p1->
x == p2->
x && p1->
y == p2->
y )
131 FT_Outline* outline = &loader->current.outline;
138 error = PFR_Err_Invalid_Table;
139 FT_ERROR((
"pfr_glyph_line_to: invalid glyph data\n" ));
167 FT_Outline* outline = &loader->current.outline;
174 error = PFR_Err_Invalid_Table;
175 FT_ERROR((
"pfr_glyph_line_to: invalid glyph data\n" ));
271 x_count = count & 15;
272 y_count = count >> 4;
289 count = x_count + y_count;
310 for ( i = 0; i <
count; i++ )
312 if ( ( i & 7 ) == 0 )
352 pos[0].
x = pos[0].
y = 0;
365 format_low = format & 15;
367 switch ( format >> 4 )
385 args_format = format_low;
390 FT_TRACE6((
"- horizontal line to cx.%d", format_low ));
391 if ( format_low >= x_count )
400 FT_TRACE6((
"- vertical line to cy.%d", format_low ));
401 if ( format_low >= y_count )
424 args_format = format_low;
431 for ( n = 0; n < args_count; n++ )
438 switch ( args_format & 3 )
443 if ( idx >= x_count )
458 cur->
x = pos[3].
x + delta;
468 switch ( ( args_format >> 2 ) & 3 )
473 if ( idx >= y_count )
488 cur->
y = pos[3].
y + delta;
498 if ( n == 0 && args_count == 4 )
517 switch ( format >> 4 )
549 error = PFR_Err_Invalid_Table;
550 FT_ERROR((
"pfr_glyph_load_simple: invalid glyph data\n" ));
576 count = flags & 0x3F;
583 if (error)
goto Exit;
596 if ( org_count + count > glyph->
max_subs )
605 error = PFR_Err_Invalid_Table;
606 FT_ERROR((
"pfr_glyph_load_compound:"
607 " too many compound glyphs components\n" ));
617 subglyph = glyph->
subs + org_count;
619 for ( i = 0; i <
count; i++, subglyph++ )
646 switch ( format & 3 )
662 switch ( ( format >> 2 ) & 3 )
712 error = PFR_Err_Invalid_Table;
713 FT_ERROR((
"pfr_glyph_load_compound: invalid glyph data\n" ));
754 count = glyph->
num_subs - old_count;
756 FT_TRACE4((
"compound glyph with %d elements (offset %lu):\n",
760 for ( n = 0; n <
count; n++ )
762 FT_Int i, old_points, num_points;
768 subglyph = glyph->
subs + old_count +
n;
778 subglyph = glyph->
subs + old_count +
n;
779 num_points = base->
n_points - old_points;
782 if ( subglyph->
x_scale != 0x10000L || subglyph->
y_scale != 0x10000L )
787 for ( i = 0; i < num_points; i++, vec++ )
797 FT_Vector*
vec = loader->base.outline.points + old_points;
800 for ( i = 0; i < num_points; i++, vec++ )
810 FT_TRACE4((
"end compound glyph with %d elements\n", count ));
814 FT_TRACE4((
"simple glyph (offset %lu)\n", offset ));
#define FT_CURVE_TAG_CUBIC
static FT_Error pfr_glyph_curve_to(PFR_Glyph glyph, FT_Vector *control1, FT_Vector *control2, FT_Vector *to)
typedefFT_BEGIN_HEADER struct FT_GlyphLoaderRec_ * FT_GlyphLoader
#define FT_ERROR(varformat)
#define FT_PAD_CEIL(x, n)
#define FT_TRACE4(varformat)
static FT_Error pfr_glyph_load_simple(PFR_Glyph glyph, FT_Byte *p, FT_Byte *limit)
static FT_Error pfr_glyph_line_to(PFR_Glyph glyph, FT_Vector *to)
pfr_glyph_done(PFR_Glyph glyph)
FT_GlyphLoader_Add(FT_GlyphLoader loader)
pfr_extra_items_skip(FT_Byte **pp, FT_Byte *limit)
static FT_Error pfr_glyph_load_rec(PFR_Glyph glyph, FT_Stream stream, FT_ULong gps_offset, FT_ULong offset, FT_ULong size)
static FT_Error pfr_glyph_move_to(PFR_Glyph glyph, FT_Vector *to)
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum format
#define FT_TRACE7(varformat)
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
pfr_glyph_init(PFR_Glyph glyph, FT_GlyphLoader loader)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
#define FT_STREAM_SEEK(position)
FT_MulFix(FT_Long a, FT_Long b)
static void pfr_glyph_start(PFR_Glyph glyph)
#define FT_TRACE6(varformat)
GLenum GLsizei GLsizei GLsizei GLsizei GLbitfield flags
pfr_glyph_load(PFR_Glyph glyph, FT_Stream stream, FT_ULong gps_offset, FT_ULong offset, FT_ULong size)
FT_GlyphLoader_Rewind(FT_GlyphLoader loader)
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
#define FT_FRAME_ENTER(size)
static FT_Error pfr_glyph_load_compound(PFR_Glyph glyph, FT_Byte *p, FT_Byte *limit)
#define PFR_NEXT_USHORT(p)
static void pfr_glyph_close_contour(PFR_Glyph glyph)
#define FT_GLYPHLOADER_CHECK_POINTS(_loader, _points, _contours)
static void pfr_glyph_end(PFR_Glyph glyph)
#define PFR_NEXT_SHORT(p)