RE: [gtk-list] RE: Simple example of fonts? ( and more )
- From: Tony Gale <gale daedalus dera gov uk>
- To: gtk-list redhat com
- Subject: RE: [gtk-list] RE: Simple example of fonts? ( and more )
- Date: Tue, 17 Mar 1998 15:57:32 -0000 (GMT)
On 17-Mar-98 Tony Gale wrote:
> You can load a font using:
>
> GdkFont *font_bold;
> font_bold = gdk_font_load
>
> ("-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*");
>
> You know how to allocate a colour, so, if you are using the Text
> wiget, you can do something like:
>
> gtk_text_insert (GTK_TEXT (text_widget), &font_bold,
> &fg_colour, &bg_colour, text, -1);
Oops. The font and colours should just be pointers, so that should be:
gtk_text_insert (GTK_TEXT (text_widget), font_bold,
&fg_colour, &bg_colour, text, -1);
assuming your colours are setup with something like:
GdkColor fg_colour;
GdkColor bg_colour;
--
E-Mail: Tony Gale <gale@daedalus.dera.gov.uk>
Exceptions prove the rule, and wreck the budget.
-- Miller
The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]