Skip to content

Instantly share code, notes, and snippets.

@zhuzhonghua
Created February 7, 2015 03:45
Show Gist options
  • Save zhuzhonghua/da163605a802b06f2f66 to your computer and use it in GitHub Desktop.
Save zhuzhonghua/da163605a802b06f2f66 to your computer and use it in GitHub Desktop.
emacs-org-mode-tabl-chinese-align.elisp
;;
(eval-when-compile (require 'cl))
(defun set-font (english chinese english-size chinese-size)
(set-face-attribute 'default nil :font
(format "%s:pixelsize=%d" english english-size))
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font) charset
(font-spec :family chinese :size chinese-size))))
(ecase system-type
(gnu/linux
(set-face-bold-p 'bold nil)
(set-face-underline-p 'bold nil)
(set-font "monofur" "vera Sans YuanTi Mono" 20 20))
(darwin
(set-font "monofur" "STHeiti" 20 20))
(windows-nt
(set-face-bold-p 'bold nil)
(set-face-underline-p 'bold nil)
(set-font "monofur" "vera Sans YuanTi Mono" 20 20)))
@zhuzhonghua
Copy link
Author

this is the final solution

(set-face-attribute
'default nil :font "Consolas 14")
;; Chinese Font
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font)
charset
(font-spec :family "Microsoft Yahei" :size 20)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment