Re: what font is actually used?



Ian Martin said the following at 10/02/2011 06:52 PM :

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

OK, I'll try to wade through that tomorrow. It looks horribly complicated
for such a simple thing as changing a font to something other than the default.

Can you please tell me what was wrong with using override_font()? The
documentation for that font explicitly says: "Sets the font to use for a
widget", which is exactly what I want to do.

So why is using override_font() to change the font incorrect?

> get_attributes () const
> 	Gets the attribute list that was set on the label using
> set_attributes()

That seems to say that it will simply return the same information as was
passed using set_attributes(). Is that not so?

(The documentation should be a lot clearer if my interpretation of the text
is incorrect. The documentation in that case should say something simply to
the effect of "returns the attributes", without any reference to the
set_attributes() function. If a prior set_attributes() function isn't
important, it shouldn't be mentioned.)

  Doc

-- 
Web:  http://www.sff.net/people/N7DR

Attachment: signature.asc
Description: OpenPGP digital signature



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