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
<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.
Pango::AttrList
<http://library.gnome.org/devel/pangomm/unstable/classPango_1_1AttrList.html>
get_attributes
<http://developer.gnome.org/gtkmm/unstable/classGtk_1_1Label.html#a46eb8eb7e90c27d2ec7ed79797951bc8>
() const
Gets the attribute list that was set on the label using
set_attributes()
<http://developer.gnome.org/gtkmm/unstable/classGtk_1_1Label.html#a79b1642f8314e17babcc2808e74315b1>,
if any.
and the attribute list documentation is in the Gtk docs, eg here at the
Gnome website
<http://developer.gnome.org/pango/stable/pango-Text-Attributes.html>, 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
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list