failing to get PangoContext
- From: Daniel Glassey <danglassey ntlworld com>
- To: gtk-i18n-list gnome org
- Subject: failing to get PangoContext
- Date: Sat, 18 Oct 2003 21:45:32 +0100
Hi,
When I try and run a pretty minimal program below which just opens up a
display and tries to get a PangoContext from it it fails with the error
below.
Am I missing something obvious?
Regards,
Daniel
----
Pango 1.2.5
Glib 2.2.3
libxft2 2.1.2
system: Debian unstable
test 0
(process:6901): GLib-GObject-CRITICAL **: gtype.c:1871: initialization
assertion failed, use g_type_init() prior to this function
(process:6901): GLib-GObject-CRITICAL **: file gobject.c: line 615
(g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed
** (process:6901): CRITICAL **: file pango-context.c: line 160
(pango_context_set_font_map): assertion `PANGO_IS_CONTEXT (context)' failed
couldn't get a pango xft context
minimal.c
---------------
#include <X11/Xlib.h>
#include <stdio.h>
#include <pango/pangoxft.h>
static PangoContext *context = NULL;
/* Global variables */
Display * display;
int screen_num;
/* main() function */
int main( int argc, char * argv[] ) {
/* Connect to X server */
if ( (display = XOpenDisplay(NULL)) == NULL ) {
fprintf(stderr, "couldn't connect to X server\n");
exit(EXIT_FAILURE);
}
printf("test %d\n", DefaultScreen(display));
if ( (context = pango_xft_get_context(display, DefaultScreen(display))) ==
NULL ) {
fprintf(stderr, "couldn't get a pango xft context\n");
exit(EXIT_FAILURE);
}
printf("got context\n");
return EXIT_SUCCESS;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]