nanogui: Thread: NanoGTK, Chinese and Locale


[<<] [<] Page 1 of 1 [>] [>>]
Subject: NanoGTK, Chinese and Locale
From: Chen sheng ####@####.####
Date: 19 Aug 2002 07:53:25 -0000
Message-Id: <20020819073839.31550.qmail@web9905.mail.yahoo.com>

Hi Johnny Fung,

How can I display Chinese multi-byte string in NanoGTK?  Does it need
libc Chinese locale support?

Because my application will run on uclinux, which uses uclibc.  But
currently uclibc has no Chinese locale support.

Regards,
Sheng


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
Subject: Re: NanoGTK, Chinese and Locale
From: Johnny Fung ####@####.####
Date: 20 Aug 2002 03:06:56 -0000
Message-Id: <3D61B78C.AF95CF44@emsoftltd.com>

Mr Chen,

I've never used Locale other than en_US. You should download and
install the chinese extension archive:

   microwindows-fonts-chinese-0.89pre2.tar.gz
   
Edit the file config.x86 as below appropriately:

####################################################################
# Chinese Han Zi Ku font support
####################################################################
HAVE_HZK_SUPPORT         = Y
HZK_FONT_DIR             = "fonts/chinese"

####################################################################
# Chinese BIG5 compiled in font support (big5font.c)
####################################################################
HAVE_BIG5_SUPPORT        = Y

####################################################################
# Chinese GB2312 compiled in font support (gb2312font.c)
####################################################################
HAVE_GB2312_SUPPORT      = Y


Then rebuild NanoGTK and hope this will work.

Regards,
Johnny Fung
Subject: Re: NanoGTK, Chinese and Locale
From: Chen sheng ####@####.####
Date: 20 Aug 2002 14:10:50 -0000
Message-Id: <20020820135600.24715.qmail@web9902.mail.yahoo.com>

Hi Johnny Fung,

I am glad to hear that NanoGTK is not locale dependent.  But I still
have something not very clear.  In Microwindows we can create Chinese
font by:

    font = GrCreateFont("HZKFONT", 16, NULL);

Similarly, in GDK we can load font by calling gdk_font_load() or
gdk_fontset_load().  But Microwindows font names are different from
XWindow XLFD font names.  I read the code of gdk_font_load() in
NanoGTK, find it converts XLFD font name to Microwindows font
name.  For example, if XLFD font name is

    -*-*-medium-r-normal--12-*-*-*-*-*-gb2312.1980-0

then the corresponding Microwindows font name is
GR_FONT_CJKGB12_FIXED, which is a macro defined as "cjk_gb_hzk12".
But where is the font "cjk_gb_hzk12"?

I also notice there are Chinese fonts in the directory
$NANOGTK_HOME/Testbench/fonts.  But how can they be used?

Regards,
Sheng


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.