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;
79 pfr_glyph_close_contour(
PFR_Glyph glyph )
82 FT_Outline* outline = &loader->current.outline;
103 if ( p1->
x == p2->
x && p1->
y == p2->
y )
131 FT_Outline* outline = &loader->current.outline;
139 FT_ERROR((
"pfr_glyph_line_to: invalid glyph data\n" ));
167 FT_Outline* outline = &loader->current.outline;
175 FT_ERROR((
"pfr_glyph_line_to: invalid glyph data\n" ));
210 pfr_glyph_close_contour( glyph );
219 error = pfr_glyph_line_to( glyph, to );
229 pfr_glyph_close_contour( glyph );
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 )
344 pfr_glyph_start( glyph );
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 )
520 pfr_glyph_end( glyph );
526 error = pfr_glyph_line_to( glyph, pos );
531 error = pfr_glyph_move_to( glyph, pos );
535 error = pfr_glyph_curve_to( glyph, pos, pos + 1, pos + 2 );
550 FT_ERROR((
"pfr_glyph_load_simple: invalid glyph data\n" ));
557 pfr_glyph_load_compound(
PFR_Glyph glyph,
576 count = flags & 0x3F;
583 if (error)
goto Exit;
596 if ( org_count + count > glyph->
max_subs )
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 )
713 FT_ERROR((
"pfr_glyph_load_compound: invalid glyph data\n" ));
747 error = pfr_glyph_load_compound( glyph, p, limit );
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;
771 error = pfr_glyph_load_rec( glyph, stream, gps_offset,
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 ));
817 error = pfr_glyph_load_simple( glyph, p, limit );
840 return pfr_glyph_load_rec( glyph, stream, gps_offset,
offset,
size );
#define FT_CURVE_TAG_CUBIC
return FT_THROW(Missing_Property)
GLint GLint GLint GLint GLint x
typedefFT_BEGIN_HEADER struct FT_GlyphLoaderRec_ * FT_GlyphLoader
#define FT_ERROR(varformat)
#define FT_PAD_CEIL(x, n)
#define FT_TRACE4(varformat)
pfr_glyph_done(PFR_Glyph glyph)
FT_GlyphLoader_Add(FT_GlyphLoader loader)
pfr_extra_items_skip(FT_Byte **pp, FT_Byte *limit)
#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)
if(!abbox) return FT_THROW(Invalid_Argument)
#define FT_TRACE6(varformat)
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)
GLuint GLuint GLsizei count
#define FT_FRAME_ENTER(size)
#define PFR_NEXT_USHORT(p)
#define FT_GLYPHLOADER_CHECK_POINTS(_loader, _points, _contours)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define PFR_NEXT_SHORT(p)