Re: [gtk-list] Freetype and G[TD]K




I don't know if this is any closer to fixing it, but if I make a GdkImage
out of the bitmap field, and then call gtk_image_new (gdkim, NULL); I get a
black square of the correct size, and if I put a GdkBitmap created from
gtk_pixmap_new (NULL, width, height, 1) as the second parameter, I get
random guff in the window (probably because I didn't clear the bitmap, as
when I tried gdk_window_clear, it gave a BadWindow error)

Iain
> 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.




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