|
|
|
@ -38,30 +38,6 @@ |
|
|
|
|
/*************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static FT_Error |
|
|
|
|
ftc_sbit_copy_bitmap( FTC_SBit sbit, |
|
|
|
|
FT_Bitmap* bitmap, |
|
|
|
|
FT_Memory memory ) |
|
|
|
|
{ |
|
|
|
|
FT_Error error; |
|
|
|
|
FT_Int pitch = bitmap->pitch; |
|
|
|
|
FT_ULong size; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( pitch < 0 ) |
|
|
|
|
pitch = -pitch; |
|
|
|
|
|
|
|
|
|
size = (FT_ULong)pitch * bitmap->rows; |
|
|
|
|
if ( !size ) |
|
|
|
|
return FT_Err_Ok; |
|
|
|
|
|
|
|
|
|
if ( !FT_ALLOC( sbit->buffer, size ) ) |
|
|
|
|
FT_MEM_COPY( sbit->buffer, bitmap->buffer, size ); |
|
|
|
|
|
|
|
|
|
return error; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FT_LOCAL_DEF( void ) |
|
|
|
|
ftc_snode_free( FTC_Node ftcsnode, |
|
|
|
|
FTC_Cache cache ) |
|
|
|
@ -108,7 +84,6 @@ |
|
|
|
|
FT_Error error; |
|
|
|
|
FTC_GNode gnode = FTC_GNODE( snode ); |
|
|
|
|
FTC_Family family = gnode->family; |
|
|
|
|
FT_Memory memory = manager->memory; |
|
|
|
|
FT_Face face; |
|
|
|
|
FTC_SBit sbit; |
|
|
|
|
FTC_SFamilyClass clazz; |
|
|
|
@ -123,7 +98,7 @@ |
|
|
|
|
sbit = snode->sbits + ( gindex - gnode->gindex ); |
|
|
|
|
clazz = (FTC_SFamilyClass)family->clazz; |
|
|
|
|
|
|
|
|
|
sbit->buffer = 0; |
|
|
|
|
sbit->buffer = NULL; |
|
|
|
|
|
|
|
|
|
error = clazz->family_load_glyph( family, gindex, manager, &face ); |
|
|
|
|
if ( error ) |
|
|
|
@ -178,8 +153,9 @@ |
|
|
|
|
sbit->format = (FT_Byte)bitmap->pixel_mode; |
|
|
|
|
sbit->max_grays = (FT_Byte)(bitmap->num_grays - 1); |
|
|
|
|
|
|
|
|
|
/* copy the bitmap into a new buffer -- ignore error */ |
|
|
|
|
error = ftc_sbit_copy_bitmap( sbit, bitmap, memory ); |
|
|
|
|
/* take the bitmap ownership */ |
|
|
|
|
sbit->buffer = bitmap->buffer; |
|
|
|
|
slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; |
|
|
|
|
|
|
|
|
|
/* now, compute size */ |
|
|
|
|
if ( asize ) |
|
|
|
|