Re: setting an new font and new font size to an gtk_label
- From: Vadim Berezniker <vadim berezniker com>
- To: Luiz Rafael Culik Guimaraes <culikr uol com br>
- Cc: gtk-list gnome org
- Subject: Re: setting an new font and new font size to an gtk_label
- Date: Mon, 25 Aug 2003 18:40:11 -0400
Luiz Rafael Culik Guimaraes wrote:
Dear Friends
How to change the default font of an gtk_label item as well the font size
(in C is prefer)
This is the method I use:
PangoFontDescription *font_desc =
pango_font_description_from_string(font_string);
GtkRcStyle *style = gtk_widget_get_modifier_style(label);
style -> font_desc = font_desc;
gtk_widget_modify_style(label, style);
You can get the font string from a Font Selection dialog or make on
yourself. The format is at
http://developer.gnome.org/doc/API/2.0/pango/pango-Fonts.html#pango-font-description-from-string
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]