Vláďa wrote:
Hi,
I have a question regarding labels and Pango.
I want to use different sizes of font, but unfortunately it doesn't
work. If I use
self.label = gtk.Label('<span size="14">Text 1</span>\n<span
size="10">Text 2</span>')
then only the first size definition (14) is taken into account. The
second line has the same font size.
Is this a feature, bug or my fault? Hot to create a label with
different font sizes in it?
First you have to tell the label to use Pango markup:
self.label.set_use_markup(True)
Then you have to specify a readable size since numerical sizes are in
thousandths of a point - see:
http://www.pygtk.org/docs/pygtk/pango-markup-language.html
John
_______________________________________________
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/