35 #include FT_INTERNAL_OBJECTS_H
46 #define FT_COMPONENT trace_glyph
66 if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
68 error = FT_Err_Invalid_Glyph_Format;
72 glyph->
left = slot->bitmap_left;
73 glyph->
top = slot->bitmap_top;
78 glyph->
bitmap = slot->bitmap;
102 target->
top = source->
top;
126 cbox->xMin = glyph->
left << 6;
127 cbox->xMax = cbox->xMin + ( glyph->
bitmap.
width << 6 );
128 cbox->yMax = glyph->
top << 6;
129 cbox->yMin = cbox->yMax - ( glyph->
bitmap.
rows << 6 );
135 FT_GLYPH_FORMAT_BITMAP,
156 ft_outline_glyph_init(
FT_Glyph outline_glyph,
169 error = FT_Err_Invalid_Glyph_Format;
250 slot->outline = glyph->
outline;
261 ft_outline_glyph_init,
290 if ( !
FT_ALLOC( glyph, clazz->glyph_size ) )
293 glyph->
clazz = clazz;
294 glyph->
format = clazz->glyph_format;
323 if ( !source || !source->clazz )
329 clazz = source->clazz;
330 error = ft_new_glyph( source->library, clazz, © );
334 copy->
advance = source->advance;
335 copy->
format = source->format;
337 if ( clazz->glyph_copy )
338 error = clazz->glyph_copy( source, copy );
364 return FT_Err_Invalid_Slot_Handle;
366 library = slot->library;
372 if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
391 error = FT_Err_Invalid_Glyph_Format;
396 error = ft_new_glyph( library, clazz, &glyph );
401 glyph->
advance.
x = slot->advance.x << 10;
402 glyph->
advance.
y = slot->advance.y << 10;
405 error = clazz->glyph_init( glyph, slot );
429 if ( !glyph || !glyph->clazz )
433 clazz = glyph->clazz;
434 if ( clazz->glyph_transform )
437 clazz->glyph_transform( glyph, matrix, delta );
444 error = FT_Err_Invalid_Glyph_Format;
463 acbox->xMin = acbox->yMin = acbox->xMax = acbox->yMax = 0;
465 if ( !glyph || !glyph->clazz )
469 clazz = glyph->clazz;
470 if ( !clazz->glyph_bbox )
475 clazz->glyph_bbox( glyph, acbox );
528 clazz = glyph->
clazz;
530 if ( !library || !clazz )
537 if ( !clazz->glyph_prepare )
544 FT_MEM_ZERO( &dummy_internal,
sizeof ( dummy_internal ) );
547 dummy.
format = clazz->glyph_format;
564 error = clazz->glyph_prepare( glyph, &dummy );
569 if ( !destroy && origin )
597 if ( error && bitmap )
615 FT_Memory memory = glyph->library->memory;
619 if ( clazz->glyph_done )
620 clazz->glyph_done( glyph );
#define FT_ALLOC(ptr, size)
ft_outline_glyph_copy(FT_Glyph outline_source, FT_Glyph outline_target)
FT_BEGIN_HEADER FT_Bitmap_New(FT_Bitmap *abitmap)
const FT_Glyph_Class * clazz
struct FT_OutlineGlyphRec_ * FT_OutlineGlyph
typedefFT_BEGIN_HEADER struct FT_Glyph_Class_ FT_Glyph_Class
#define FT_MEM_ZERO(dest, count)
const FT_Glyph_Class ft_outline_glyph_class
enum FT_Render_Mode_ FT_Render_Mode
return FT_Err_Invalid_Argument
#define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_,transform_, bbox_, prepare_)
static void render(const Vertex_Buffer_Macrorenderer ¯orenderer, std::vector< Vertex_Buffer::Vertex_Buffer_Range * > &descriptors)
FT_Glyph_Copy(FT_Glyph source, FT_Glyph *target)
FT_Bitmap_Done(FT_Library library, FT_Bitmap *bitmap)
ft_outline_glyph_bbox(FT_Glyph outline_glyph, FT_BBox *bbox)
FT_Render_Glyph_Internal(FT_Library library, FT_GlyphSlot slot, FT_Render_Mode render_mode)
#define FT_GLYPH_OWN_BITMAP
ft_bitmap_glyph_init(FT_Glyph bitmap_glyph, FT_GlyphSlot slot)
struct FT_BitmapGlyphRec_ * FT_BitmapGlyph
FT_Lookup_Renderer(FT_Library library, FT_Glyph_Format format, FT_ListNode *node)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
FT_Glyph_Transform(FT_Glyph glyph, FT_Matrix *matrix, FT_Vector *delta)
FT_Outline_Copy(const FT_Outline *source, FT_Outline *target)
EGLContext EGLenum target
ft_outline_glyph_done(FT_Glyph outline_glyph)
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
FT_Bitmap_Copy(FT_Library library, const FT_Bitmap *source, FT_Bitmap *target)
ft_bitmap_glyph_copy(FT_Glyph bitmap_source, FT_Glyph bitmap_target)
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
ft_outline_glyph_prepare(FT_Glyph outline_glyph, FT_GlyphSlot slot)
FT_Outline_New(FT_Library library, FT_UInt numPoints, FT_Int numContours, FT_Outline *anoutline)
FT_Outline_Done(FT_Library library, FT_Outline *outline)
FT_Glyph_Class glyph_class
ft_bitmap_glyph_done(FT_Glyph bitmap_glyph)
ft_outline_glyph_transform(FT_Glyph outline_glyph, const FT_Matrix *matrix, const FT_Vector *delta)
ft_bitmap_glyph_bbox(FT_Glyph bitmap_glyph, FT_BBox *cbox)
#define FT_BITMAP_GLYPH_CLASS_GET
FT_Glyph_To_Bitmap(FT_Glyph *the_glyph, FT_Render_Mode render_mode, FT_Vector *origin, FT_Bool destroy)
#define FT_CALLBACK_DEF(x)
local int destroy(gz_stream *s)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_Get_Glyph(FT_GlyphSlot slot, FT_Glyph *aglyph)
#define FT_OUTLINE_GLYPH_CLASS_GET
FT_Vector_Transform(FT_Vector *vec, const FT_Matrix *matrix)
FT_Slot_Internal internal
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
FT_Glyph_Get_CBox(FT_Glyph glyph, FT_UInt bbox_mode, FT_BBox *acbox)
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap
GLsizei GLsizei GLchar * source
FT_Done_Glyph(FT_Glyph glyph)
FT_Module_Constructor FT_GLYPH_FORMAT_OUTLINE