How to use Microsoft Windows Chinese System font



Hi,

Now,  I have problem in displaying Chinese characters on the GTKEntry
(probably other controls as well).

My coding on the GTK application is like the following:

 ....
....
get_set_locale();
gtk_rc_add_default_file("gtkrc.zh");
gtk_init(...., .....);
....
....

I created the rc file (gtkrc.zh) content to the following:

style "default" {
    font_name="Sans Italic 10"
}
class "GtkWidget" style "default"

The fonts of  the controls, include the GtkEntry, botton, labels had been
changed successfully. But, I don't know what should be the font name of the
Chinese font. I'm working on Chinese Windows 2000 Professional.

I saw that "Sans Italic 10" is one of the Pango font name regarding to GTK
Reference API, so I put it on my applicatoin, and it worked!!

Then,

1. What's the name of the Chinese font in Pango?
2. Also, I guessed the font name and replace "Sans" to "Mingliu", but an
error message said "No font found". I suspect where will Pango find the
font? Is it from the dll of lib directory under Pango? If yes, can I use the
Windows fonts. If not, I may have some additional fonts, how can I change
Windows font to Pango font? Is it a dll?
3. How can I use my Windows System fonts? I saw that Pango can use Windows
system fonts, but I don't know how to do so.

Thanks!

Best regards,
Mullin





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