Re: Creating a font based on the GTK default font
- From: Dominic Sacré <bugcreator gmx de>
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-list gnome org
- Subject: Re: Creating a font based on the GTK default font
- Date: Thu, 21 Feb 2002 22:56:08 +0100
On Thursday 21 February 2002 18:29, Havoc Pennington wrote:
> 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.
Hmm, a nightmare, indeed... But is there no reasonable way to get at least
the name (logical font description) of the default font?
> 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()).
Sounds great... I should really consider porting my code to GTK2 soon...
Thanks,
Dominic
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]