This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Setting th font of a label ?


Hello !

I want to change the font of a gtk-label. If I coded in C I would do
the following:

    GtkWidget *label;
    GtkStyle *style;
    
    label = gtk_label_new ("Blargl 111MMM111");

    style = gtk_style_new ();
    gdk_font_unref (style->font);
    style->font = gdk_font_load ("fixed");
    gtk_widget_set_style (label, style);

How can I do that with guile-gtk ? I looked in gtk-1.2.defs, I found
stuff to get a style from a widget, but in the style no font is
mentioned. It seems like I can load (gdk-font-load) and select a font
with a dialog, but what can I do with that font ?? Ok, I can draw
strings with (gdk-draw-string), but I need the font on a label...

I tried guile-gtk pre0.21 with guile 1.3.4

Thanks in advance
chb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]