After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 97146 - Add set_font_weight and set_font_style
Add set_font_weight and set_font_style
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-10-29 17:05 UTC by Christian Rose
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Rose 2002-10-29 17:05:13 UTC
Unnecessary markup should be removed from messages, to avoid problems for
translators. Details on that are in bug 96836. hp@redhat.com suggested:

"if we really want people to avoid the markup, I think we need to
add:

 gtk_label_set_font_weight ();
 gtk_label_set_font_style ();

etc. Maybe worth a GTK bug."
Comment 1 Owen Taylor 2002-11-01 17:25:49 UTC
The right api is gtk_widget_modify_font() .. I think
adding gtk_widget_modify_weight() gtk_widget_modify_family(), 
etc would just be too much bloat.

 PangoFontDescription *font_desc = pango_font_description_from_string
("bold");
 gtk_widget_modify_font (label, font_desc);
 pango_font_description_free (font_desc);
Comment 2 bill.haneman 2003-06-12 12:33:13 UTC
I disagree with you on this Owen - the markup API is simple, which is
a strength, but it's creating problems for translators.  Having to use
several API calls in place of a simple string markup results in either
programmers removing the markup altogether due to the hassle, or
leaving it in and getting mailbombed by the translation team.

Possibly even better would be gtk_label_new_with_text (char *text, ...)

thus

gtk_label_new_with_text ("<small><i>", _("foo"), "</i></small>",
                         NULL);


Bill