Re: Gtklabel and BIG font ?



Hi,

Krigler Pavol <krigler slovakradio sk> writes:

> I`ve read some documentation about pango`s markup language but I did not
> find how to make a very large fonts (10x bigger then <xx-large> or
> more). I need to do a really BIG digits for my clock. Do you have some
> ideas how to do it ?

if you are writing a clock, PangoMarkup is probably not the right
thing to use anyway. It's quite a bit of overhead and I don't see why
a clock should parse an XML representation of the time each and every
second just to get it displayed in a large font. The user might want
to have some CPU-cycles left to do other things in the meantime. You
should consider to set the font size once when you create the label
to display the time. Something along these lines should do the trick:

{
  GtkWidget            *label;
  PangoFontDescription *desc;

  label = gtk_label_new (NULL);

  desc  = pango_font_description_from_string ("Sans 100");
  gtk_widget_modify_font (label, desc);
  pango_font_description_free (desc);

  /* ... */
}


Salut, Sven



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