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

Re: gtklabel font size change?



On Sat, Jan 25, 2003 at 12:21:55PM +0000, Bastien Nocera wrote: 
> You'll be able to change the size of a font with Gtk+ 2.x like so:
> 
> GtkWidget *label;
> 
> label = gtk_label_new ("<span size=\"100\">Fooo</span>");
> gtk_label_set_use_markup (GTK_LABEL (label));

It's better to use markup "<large>Foo</large>" as that will be
relative to the user's normal font size, rather than hardcoded to 
a particular point size. There's also <span size="x-large"> type stuff 
I think.

It's also possible to skip markup and just use
gtk_label_set_attributes(), generally translators prefer that.  see
eel_gtk_label_set_scale() in the "eel" library for example code.

Havoc



Reply to: