[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] FT_Outline_Decompose
From: |
Wallace Chigona |
Subject: |
[Freetype] FT_Outline_Decompose |
Date: |
Mon, 17 Sep 2001 15:23:29 +0200 |
I don't know what's wrong with the following code. I am getting a bus
error on FT_Outline_Decompose(gOutline->outline, &_interface, this )).
What am I possibly doing wrong.
Regards,
==============================================
_interface.line_to = (FT_Outline_LineTo_Func)lineToCallback;
_interface.conic_to = (FT_Outline_ConicTo_Func)conicToCallback;
_interface.cubic_to = (FT_Outline_CubicTo_Func)cubicToCallback;
_interface.shift = 0;
_interface.delta = 0;
if (FT_Init_FreeType( &library ))
cerr << "error on library";
error = FT_New_Face( library,
"/usr/lib/X11/fonts/Type1/Helvetica.pfa",
0, &face );
if ( error == FT_Err_Unknown_File_Format )
cerr << "can be open but not read\n";
else if ( error )
cerr << "could not be opened\n";
FT_Set_Pixel_Sizes(face, 20, 0);
FT_UInt glyph_index = FT_Get_Char_Index( face, 'A' );
FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
FT_OutlineGlyph gOutline;
if ( FT_Get_Glyph( face->glyph, (FT_Glyph*)&gOutline ))
cerr << "error outline\n";
if (FT_Outline_Decompose(&gOutline->outline, &_interface, this ))
cerr << " error decomposing\n";
- [Freetype] FT_Outline_Decompose,
Wallace Chigona <=