showing multifonts at one time using gdk_fontset_load()?
- From: "david" <davidchen itri org tw>
- To: <gtk-list gnome org>
- Subject: showing multifonts at one time using gdk_fontset_load()?
- Date: Thu, 1 Mar 2001 13:56:50 +0800
Hi,
I would like to display multifonts (English and Chinese) at one time by using the function gdk_fontset_load(),
but it ends up with showing nothing. I am not quite sure what's wrong with it.
Can anyone help me with it?
Thanks
David
The following is my code:
#include <gtk/gtk.h>
#include <glib.h>
int main (int argc, char *argv[])
{
GtkWidget *win, *label ;
GtkStyle *default_style, *new_style;
gtk_init (&argc, &argv);
g_print("argc =%d\n", argc);
g_print("argv =%s\n", argv[0]);
default_style = gtk_widget_get_default_style ();
new_style = gtk_style_copy (default_style);
new_style->font = gdk_fontset_load (
"-adobe-helvetica-bold-r-normal-*-*-120-*-*-p-*-iso8859-1,
-taipei-ming-medium-r-normal--16-160-75-75-c-160-big5-0");
gtk_widget_push_style (new_style);
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size( GTK_WINDOW (win), 300, 300);
label = gtk_label_new ("簡介abc");
gtk_container_add (GTK_CONTAINER (win), label);
gtk_widget_show_all (win);
gtk_main ();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]