感谢支持
我们一直在努力

Fedora 9下emacs 22的中文设置

Fedora 9下默认启动后emacs是可以输入和中文的,但因为默认字体按照字符集划分的设置问题,很多中文使用日文或韩文字符显示的,导致字体显示不平衡,比较丑陋。


建议设置步骤


安装文泉译字体


# yum install wqy-bitmap-fonts
# ln -s wqy-bitmap-fonts/bitmap /etc/X11/fontpath.d/wqy-bitmap-fonts.fonts



设置完毕后,用 xlsfonts 检查 :


$ xlsfonts | grep wenquanyi | head -n 1
-wenquanyi-wenquanyi bitmap song-bold-r-normal–0-0-100-100-p-0-big5-0



在你的DotEmacs中加入这些设置:


(prefer-coding-system ‘utf-8)


;; set cjk font for fontset-default
(let ((fontname ‘(“wenquanyi bitmap song” . nil)))
(dolist (elt `((chinese-gb2312 . ,fontname)
(chinese-big5-1 . ,fontname)
(chinese-big5-2 . ,fontname)
(chinese-sisheng . ,fontname)
(chinese-cns11643-1 . ,fontname)
(chinese-cns11643-2 . ,fontname)
(chinese-cns11643-3 . ,fontname)
(chinese-cns11643-4 . ,fontname)
(chinese-cns11643-5 . ,fontname)
(chinese-cns11643-6 . ,fontname)
(chinese-cns11643-7 . ,fontname)
(japanese-jisx0208-1978 . ,fontname)
(japanese-jisx0208 . ,fontname)
(japanese-jisx0212 . ,fontname)
(japanese-jisx0213-1 . ,fontname)
(japanese-jisx0213-2 . ,fontname)
(korean-ksc5601 . ,fontname)))
(set-fontset-font “fontset-default” (car elt) (cdr elt))))


;; set sample texts for “Display Faces”
(setq list-faces-sample-text
“ABCDEFTHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 11223344556677889900
ABCDEFTHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 壹贰叁肆伍陆柒捌玖零”)

赞(0) 打赏
转载请注明出处:服务器评测 » Fedora 9下emacs 22的中文设置
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏