|
|
应该很多人都会。
1. 系统环境
首先你的系统需要满足 UTF-8 环境,很简单:
$ apt-get install locales
$ dpkg-reconfigure locales
加入 zh_CN.UTF-8
$ vi ~/.xinitrc
加入
LANGUAGE=zh_CN.UTF-8
LANG=zh_CN.UTF-8
LC_ALL=zh_CN.UTF-8
KDE_LANG=zh_CN.UTF-8
export LANGUAGE LANG LC_ALL KDE_LANG
$ locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8
2. 版本信息
我使用的是 Debian sid 提供的 XFree86 4.3 版本,其它版本未测试。
3. 字体环境
如果你习惯用老式的字体服务,先观察
$ xlsfonts |grep arphic
-arphic-ar pl kaitim big5-medium-r-normal--0-0-0-0-c-0-big5-0
-arphic-ar pl kaitim big5-medium-r-normal--0-0-0-0-c-0-iso10646-1
-arphic-ar pl kaitim big5-medium-r-normal--0-0-0-0-c-0-iso8859-1
-arphic-ar pl kaitim big5-medium-r-normal--0-0-0-0-m-0-big5-0
-arphic-ar pl kaitim big5-medium-r-normal--0-0-0-0-m-0-iso10646-1
-arphic-ar pl kaitim big5-medium-r-normal--0-0-0-0-m-0-iso8859-1
-arphic-ar pl kaitim gb-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
-arphic-ar pl kaitim gb-medium-r-normal--0-0-0-0-c-0-iso10646-1
-arphic-ar pl kaitim gb-medium-r-normal--0-0-0-0-c-0-iso8859-1
-arphic-ar pl kaitim gb-medium-r-normal--0-0-0-0-m-0-gb2312.1980-0
-arphic-ar pl kaitim gb-medium-r-normal--0-0-0-0-m-0-iso10646-1
-arphic-ar pl kaitim gb-medium-r-normal--0-0-0-0-m-0-iso8859-1
-arphic-ar pl sungtil gb-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
-arphic-ar pl sungtil gb-medium-r-normal--0-0-0-0-c-0-iso10646-1
-arphic-ar pl sungtil gb-medium-r-normal--0-0-0-0-c-0-iso8859-1
-arphic-ar pl sungtil gb-medium-r-normal--0-0-0-0-m-0-gb2312.1980-0
-arphic-ar pl sungtil gb-medium-r-normal--0-0-0-0-m-0-iso10646-1
-arphic-ar pl sungtil gb-medium-r-normal--0-0-0-0-m-0-iso8859-1
查看一下你的系统所能支持的老式字体格式,如果你未安装文鼎字体或其它任何中文字体,请先安装字体,查看所需字体请用:
$ aptitude search ttf-arphic
i A ttf-arphic-bkai00mp - "AR PL KaitiM Big5" Chinese TrueType font by Arphic Technology
p ttf-arphic-bsmi00lp - "AR PL Mingti2L Big5" Chinese TrueType font by Arphic Technology
i A ttf-arphic-gbsn00lp - "AR PL SungtiL GB" Chinese TrueType font by Arphic Technology
i ttf-arphic-gkai00mp
4. 测试
打开一个终端,如 rxvt-ml 或 konsole 等,输入:
$ xterm -en UTF-8 -fn 10x20 -fw \
"-arphic-ar pl sungtil gb-medium-r-normal--20-*-*-*-c-*-iso10646-1"
当然你也可以使用 simsun 字体。
(繁体请用 big5 字体
$ xterm -en UTF-8 -fn 10x20 -fw \
"-arphic-ar pl mingti2l big5-medium-r-normal--20-*-*-*-c-*-iso10646-1"
此时 locale 对应为 zh_TW.UTF-8)
如果你的 locale 默认不是 zh_CN.UTF-8,临时变动可用一下命令:
$ xterm -en UTF-8 -fn 10x20 -fw \
"-arphic-ar pl sungtil gb-medium-r-normal--20-*-*-*-c-*-iso10646-1"
$ export LC_ALL=zh_CN.UTF-8
5 使用 xft 支持
xft 的爱好者就更简单了,xterm 很早就支持 xft 了。
同样,首先:
$ fc-list
...
NSimSun:style=Regular
SimSun:style=Regular
SimHei:style=Regular
...
查看字体信息。
$ xterm -en UTF-8 -fn 10x20 -fa "SimSun"
|
|