Re: odd behavior



and ... here is the link line from my makefile

test:test.o
gcc -g -L/usr/X11R6/lib -L/usr/local/lib -o test test.o -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -ltermcap -liconv -lintl


Mathew Yeates wrote:

Okay, I reinstalled cygwin, got pango 1.6 and ... still aint working

here is my expose routine for my widget

static GdkPixmap *pixmap = NULL; /* set in my configure routine */
static gboolean
da_expose_event(GtkWidget * widget, GdkEventExpose * event, gpointer data)
{
   PangoContext *pc;
   PangoLayout *pl;
   PangoFontDescription *desc;
   GdkGC *gc;
   GtkStyle *style;


   style = gtk_widget_get_style(widget);
   gc = style->black_gc;


   pc = gtk_widget_create_pango_context(widget);
   pl = gtk_widget_create_pango_layout(widget, "TITLE");
   desc = pango_font_description_from_string("Sans 42");
   /* bizarre, the folllowing line does NOTHING */
   pango_context_set_font_description(pc, desc);
   /* but if I change it so I pass in the layout */
   /* pango_context_set_font_description(pl, desc); */
   /* then I get a compiler warning, but the font changes size!! */

   gdk_draw_layout(pixmap, gc, 0, 0, pl);

   gdk_draw_drawable(widget->window,
             widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
             pixmap,
             /* Only copy the area that was exposed. */
             event->area.x, event->area.y,
             event->area.x, event->area.y,
             event->area.width, event->area.height);

   return FALSE;
}

Mathew

_______________________________________________
gtk-i18n-list mailing list
gtk-i18n-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list





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