Re: Font size

On Sat, Apr 10, 2004 at 09:28:03PM +1000, Russell Shaw wrote:
This code won't change the size of a gtk_label text:

  PangoAttrList *attr_list;
  PangoAttribute *attr;

What you've discovered is the underlying programming API thats
used by the <span> markup feature. The reason what you have
doesn't work as you expect is that you didn't set the range
of characters over which the attribute applies.
Its better to use the markup for static things anyway.

You should, however, see if what you want can be accomplished
by simply applying to the modifier style of the widget.
For example:

PangoFontDescription *fdesc = pango_font_description_new();
pango_font_description_set_size(fdesc, 20000);
gtk_widget_modify_font(widget, fdesc);

As long as you don't unref this PFD you can apply it to as
many widgets as you like.


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