Re: Creating a font based on the GTK default font



Dominic Sacré <bugcreator gmx de> writes:
> 
> I'm looking for a way to get the GTK default font - i.e. the font which is 
> normally used for all GTK widgets - and to create a new font based on 
> that. For example, I want to use the same font for a widget, but bold 
> and/or italic, or the same font at a different size. How can I do that?
>

In GTK 1.2 it's a huge nightmare, but the "eel" library has example
code.

In GTK 2 you'd usually just gtk_widget_modify_font() using a font desc
that only has the attribute you want to change set; e.g. just set the
weight, but don't set the font family or anything.

In GTK 2 you can also use markup labels (see docs on gtk_label_set_markup()).
 
Havoc



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