Freetype and G[TD]K



Hi all,
I'm trying to use Freetype to draw a truetype font into a GtkWindow.
The way I'm doing it at the moment, is using freetype to render the font
into a TT_Raster_Map structure, and then using the bitmap field of that
structure as the data in gdk_pixmap_create_from_data. Then making a
gtkpixmap and packing that into the window like normal.
But when I run it, I get a BadMatch error.
The other way I tried it, was to use gdk_pixmap_new to create a pixmap of
the required depth, set it as the bitmap field of the TT_Raster_Map
structure, and then use freetype to render onto it, but that caused a
segfault inside one of the freetype functions.

Does anyone have any ideas on how to get it all to work?

Iain - The code is attached.

test2.c



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]