| View previous topic :: View next topic |
| Author |
Message |
Opera n00b


Joined: 06 May 2005 Posts: 40 Location: Paris
|
Posted: Thu Mar 08, 2007 10:11 pm Post subject: Chinese font in Emacs |
|
|
Hi,
I have discovered the internal chinese input method of Emacs, pretty fine, but the default font is quite shitty though. How can I change it ?
Thank you. _________________ "You get so used to things the way they are. And I've always been alone. I guess that's what makes me lonely. Until now".
Michael Connelly - The Black Echo |
|
| Back to top |
|
 |
big n00b


Joined: 18 Jan 2007 Posts: 69
|
Posted: Fri Mar 09, 2007 2:03 am Post subject: |
|
|
I have used scim as the chinese input program for emacs for a while and it worked fine.you can also have a try,and I think it is better than the emacs internal input method.
As the font ,WenQuanYi bitmapfont or simsun is a good choice with my configuration:
| Code: | (prefer-coding-system 'utf-8)
(create-fontset-from-fontset-spec
"-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-ifree,
chinese-gb2312:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75-75-
p-80-iso10646-1,
chinese-big5-1:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75-75-
p-80-iso10646-1,
chinese-big5-2:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75-75-
p-80-iso10646-1,
chinese-sisheng:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75-75
-p-80-iso10646-1,
chinese-cns11643-3:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75
-75-p-80-iso10646-1,
chinese-cns11643-4:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75
-75-p-80-iso10646-1,
chinese-cns11643-5:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75
-75-p-80-iso10646-1,
chinese-cns11643-6:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75
-75-p-80-iso10646-1,
chinese-cns11643-7:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75
-75-p-80-iso10646-1,
japanese-jisx0208-1978:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-16
0-75-75-p-80-iso10646-1,
japanese-jisx0208:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75-
75-p-80-iso10646-1,
japanese-jisx0212:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75-
75-p-80-iso10646-1,
japanese-jisx0213-1:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-7
5-75-p-80-iso10646-1,
japanese-jisx0213-2:-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-7
5-75-p-80-iso10646-1,
"
)
(set-default-font "fontset-ifree")
(add-to-list 'after-make-frame-functions
(lambda (new-frame) (select-frame new-frame)
(set-default-font "fontset-ifree"))) |
and another copy from internet:
| Code: | Emacs.Font: fontset-song
Emacs.FontsetList: song kai hei lucida
Emacs.Fontset-0:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-song,\
chinese-gb2312:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1,\
korean-ksc5601:-*-medium-r-normal-*-16-*-ksc5601*-*,
chinese-cns11643-5:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
chinese-cns11643-6:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
chinese-cns11643-7:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0
Emacs.Fontset-1:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-kai,\
chinese-gb2312:-*-simkai-medium-r-*--16-*-*-*-*-*-gbk-0,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1
Emacs.Fontset-2:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-hei,\
chinese-gb2312:-*-simhei-medium-r-*--16-*-*-*-*-*-gbk-0,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1
Emacs.Fontset-3:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-lucida,\
ascii:-b&h-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-iso8859-1,\
chinese-gb2312:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1 |
ps:emacs-cvs font configuration is a little different from emacs21 _________________ be big,no bug |
|
| Back to top |
|
 |
Opera n00b


Joined: 06 May 2005 Posts: 40 Location: Paris
|
Posted: Fri Mar 09, 2007 8:56 pm Post subject: |
|
|
I'm using emacs-cvs but I've modified it so it's working fine. But I my attempts to using scim with emacs have always failed.
Thank you for your help.  _________________ "You get so used to things the way they are. And I've always been alone. I guess that's what makes me lonely. Until now".
Michael Connelly - The Black Echo |
|
| Back to top |
|
 |
big n00b


Joined: 18 Jan 2007 Posts: 69
|
Posted: Sat Mar 10, 2007 5:03 am Post subject: |
|
|
| Quote: | | But I my attempts to using scim with emacs have always failed. |
Try to execute the command:
Regards! _________________ be big,no bug |
|
| Back to top |
|
 |
Opera n00b


Joined: 06 May 2005 Posts: 40 Location: Paris
|
Posted: Sun Mar 11, 2007 9:09 am Post subject: |
|
|
This is already the command that I'm using to launch scim (+ -e pinyin) but it doesn't work with emacs. Maybe because it already uses the shortcut Ctrl+space ? Anyhow, this is the only application that I can't use with scim (and skype, that crashes every time I choose the scim input method). _________________ "You get so used to things the way they are. And I've always been alone. I guess that's what makes me lonely. Until now".
Michael Connelly - The Black Echo |
|
| Back to top |
|
 |
big n00b


Joined: 18 Jan 2007 Posts: 69
|
Posted: Sun Mar 11, 2007 1:54 pm Post subject: |
|
|
Opera,
here is some information you might find useful that are scim and emacs configurations on my box.
| Code: | Calculating dependencies... done!
[ebuild R ] app-i18n/scim-1.4.5-r1 USE="gtk qt3 -doc -kde" 0 kB
Calculating dependencies... done!
[ebuild R ] app-i18n/scim-pinyin-0.5.91-r1 USE="nls -kde" 0 kB |
| Code: | Calculating dependencies... done!
[ebuild R ] app-editors/emacs-cvs-23.0.0-r1 USE="X gif gtk gzip-el jpeg nls png source spell tiff xft -Xaw3d (-aqua) -toolkit-scroll-bars" 0 kB |
| Code: | Some possible related USES in the make.conf:
cjk gtk gtk2 gnome |
My .xinitrc:
| Code: | export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"
scim -f x11 -d (or scim -f socket -d)
exec gnome-session |
My .xprofile
| Code: | export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"
scim -f x11 -d |
locale:
maybe helpful.Hope scim will cooperate with your emacs.  _________________ be big,no bug |
|
| Back to top |
|
 |
Opera n00b


Joined: 06 May 2005 Posts: 40 Location: Paris
|
Posted: Wed Mar 14, 2007 8:11 am Post subject: |
|
|
Hello again,
我和emacs没有问题了,谢谢你。
Sorry to bother you again with a last question : do you know how to display chinese characters in a console (the real one) encoded in UTF-8 ? There is no UTF-8 font that can handle chinese characters in /usr/share/consolefonts and zhcon doesn't manage UTF-8 encoding... _________________ "You get so used to things the way they are. And I've always been alone. I guess that's what makes me lonely. Until now".
Michael Connelly - The Black Echo |
|
| Back to top |
|
 |
big n00b


Joined: 18 Jan 2007 Posts: 69
|
Posted: Wed Mar 14, 2007 12:45 pm Post subject: |
|
|
hi,
Currently the Linux text console supports UTF-8 but only supports fonts with up to 512 Glyphs.That will be no problem for European languages but not for CJK.To be able to use CJK on the Linux console we need additional program which support bigger fonts and double width character such as zhcon,fbiterm Uterm and etc..
| Quote: | | zhcon doesn't manage UTF-8 encoding... |
To convert UTF-8 stream in zhcon ,issue the command:
| Code: | | cherney@localhost ~ $ zhcon --utf8 |
_________________ be big,no bug |
|
| Back to top |
|
 |
panyo Tux's lil' helper

Joined: 02 Jan 2004 Posts: 86
|
Posted: Wed Dec 26, 2007 7:13 am Post subject: |
|
|
| big wrote: |
As the font ,WenQuanYi bitmapfont or simsun is a good choice with my configuration:
|
How exactly did you get this to work?
I have tried the following:
| Code: | USE="mule cjk" emerge emacs
emerge app-emacs/mule-ucs
emerge font-isas-misc
emerge wqy-bitmapfont |
and added this to my /etc/xorg.conf
| Code: | FontPath "/usr/share/fonts/zh-kcfonts/"
FontPath "/usr/share/fonts/arphicfonts/"
FontPath "/usr/share/fonts/hkscs-ming/"
FontPath "/usr/share/fonts/wqy-bitmapfont/" |
As well as adding your code to .emacs but I still get boxes for characters.
EDIT
It was hard to find how to do this, so I will leave this up for others, but
something in the above sequence worked after I restarted my xserver. |
|
| Back to top |
|
 |
|