nanogui: freetype2 and chinese font.
Subject:
答复: [nanogui] freetype2 and chinese font.
From:
"Li Runbo (Jason)" ####@####.####
Date:
5 Jul 2004 04:55:11 +0100
Message-Id: <15F9E1AE3207D6119CEA00D0B7DD5F68029EF789@TMTMS>
The Chinese font encoding is GB2312, but freetype2 font engine uses
unicode to search in charmap. So you must covert character encoded by GB2312
to character encoded by Unicode, then the text will be displayed
Regards
Sincerely
Jason Li
-----邮件原件-----
发件人: Ronnie Wang ####@####.####
发送时间: 2004年7月5日 11:40
收件人: ####@####.####
主题: [nanogui] freetype2 and chinese font.
He all!
I set the config’s option to support freetype2 fonts .Then I
select a Chinese ttf font (simsun.ttf) and according to the following:
#define FONT
“~/microwindows-0.90/src/fonts/trurtype/simsun.ttf”
….
GR_FONT_ID font;
Font= GrCreateFont(FONT,24,NULL);
GrSetGCFont(gc,font);
……
Then I want to display a Chinese and English string as:”hello 你好
world!”;
GrText(w,gc,20,20, ”hello 你好world!”,-1,MWTF_DBCS_EUCCN);
But when I run the demo and the string display neither chinese nor
English.
So my question is:
1, Are there some Chinese freetype2 fonts the microwindows can support?
2, Whether the microwindows freetype2 fonts encoding support chinese
fonts encoding?
Someone has the successful experience please give me some hints!!!
Best Regard
******2004-07-05*********
Ronnie Wang(Wang Xingqiang)
UTStarcom Telecom Co., Ltd.
#129 WenYi Road, Hangzhou,
31002 P.R. China
Tel: (086-571) 8886-2342 ext. 6138
Email: ####@####.####
************************************