Re: what font is actually used?



On 03/10/11 08:00, D. R. Evans wrote:
D. R. Evans said the following at 09/14/2011 07:20 PM :
I believe that this is the correct way to set the font to be used in a label:

----

const string font_description_string("Courier New, medium, 14");

label.override_font(Pango::FontDescription(font_description_string));

----

How can I determine what font is actually used for the label once the
font-matching algorithm has done its work??
I never saw a response to this question. Is there a more appropriate
reflector somewhere where it would be better for me to ask it?

  Doc
Looking at the docs at http://developer.gnome.org/gtkmm/unstable/classGtk_1_1Label.html , I'd be using
void  set_attributes (Pango::AttrList& attrs)
  Sets a Pango::AttrList; the attributes in the list are applied to the label text.

Pango::AttrList  get_attributes () const
  Gets the attribute list that was set on the label using set_attributes(), if any.


and the attribute list documentation is in the Gtk docs, eg here at the Gnome website, or at file:///usr/share/doc/libpango1.0-doc/pango/pango-Text-Attributes.html#PangoAttribute if you've installed the libpango-1.0-doc package.

Ian



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