> (2) Update the documentation:
>
> By default, `FT_Get_Glyph' can be used only once. If you
> want more copies, use either `FT_Copy_Glyph' or call
> `FT_GlyphSlot_Own_Bitmap' before calling `FT_Get_Glyph' again.
Oops! This must rather be the following.
By default, @FT_Get_Glyph can be used only once since it sometimes
takes the ownership of the glyph slot's data. If you want more
copies, use either @FT_Copy_Glyph or call @FT_GlyphSlot_Own_Bitmap
(after the first @FT_Get_Glyph call but before its corresponding
call to @FT_Done_Glyph), followed by another call of @FT_Get_Glyph.
Werner
#include <stdlib.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_BITMAP_H
#include FT_GLYPH_H
int main( void )
{
FT_Library library;
FT_Face face;
FT_Glyph glyph1, glyph2;
(void) FT_Init_FreeType( &library );
(void) FT_New_Face( library, "./sample.pcf", 0, &face );
(void) FT_Load_Glyph( face, 0, 0 );
(void) FT_Get_Glyph( face->glyph, &glyph1 );
(void) FT_GlyphSlot_Own_Bitmap( face->glyph );
(void) FT_Get_Glyph( face->glyph, &glyph2 );
(void) FT_Done_Glyph( glyph1 );
(void) FT_Done_Glyph( glyph2 );
(void) FT_Done_FreeType( library );
return EXIT_SUCCESS;
}
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel