how display chinese character in gtk application?



	I install redhat6.2 linux but not install x11.
	I use gtk2.0 framebuffer ,gtk+directfb. From the archive of mailing list,I try every method to display chinese character in gtk application, but it displays with strange characters not chinese characters.
	In my program I use g_locale_to_utf8() to convert chinese character to utf8 and then use gtk_entry_set_text(GTK_ENTRY(name), chinese_name) to display, use gtk_widget_set_name (name, "chinese_style") to set the style

this is the content of .gtkrc-2.0 file in home directory

style "CN_style" = "CN_field"
{
    font_name = "SimSun 12"
}

widget "*chinese_style" style "CN_style"

I also put simsun.ttf to fonts path of /opt/gtk/share/fonts/truetype/
and XftConfig look like this:

dir "/usr/share/fonts/default/Type1"
dir "/opt/gtk/share/fonts/truetype"
includeif       "~/.xftconfig"


#
# Use TrueType fonts for defaults
#
match any family == "serif"             edit family += "Times New Roman";
match any family == "sans"              edit family += "Verdana";
match any family == "mono"              edit family += "Courier New";
match any family == "mono"              edit family += "Courier";

match any family == "simsun"
edit antialias = false; encoding = "apple-roman"

match any family == "cyberbit"
edit antialias = false; encoding = "apple-roman"

there is something wrong in it ,but I don't know how to config the XftConfig file, please help me !

Best regards 
========================= 				
yangxiaoli
yanggolf yeah net
2003-08-05





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