How to obtain font info


#1

Hi,

I would like to change my font on a label, but I do not want to use
FontButton. How can I get the font information (I guess the
Pango::FontDescription) of the font on my label, or for that matter font
used with any widget where font is used?

Thank you in advance.


#2

You should be able to to modify font used in most any widget with the
Gtk::Widget#modify_font(font), providing font is an instance of
Pango::FontDescription. However currently (Ruby 1.8.6 and Ruby-GNOME2
rel 2-0.17.0-rc1) this does not seem to be the case. I was only able to
manipulate fonts on Gtk::Label objects and editable objects like
Gtk::Entry. I could not change font on button text or button labels. I
believe this will change in the future.