Created
January 27, 2016 06:08
-
-
Save ricardolee/bb67302f3b770c518e33 to your computer and use it in GitHub Desktop.
emacs font config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq fonts | |
(cond ((eq system-type 'darwin) '("Monaco" "STHeiti")) | |
((eq system-type 'gnu/linux) '("Menlo" "WenQuanYi Zen Hei")) | |
((eq system-type 'windows-nt) '("Consolas" "Microsoft Yahei")))) | |
(set-face-attribute 'default nil :font | |
(format "%s:pixelsize=%d" (car fonts) 14)) | |
(dolist (charset '(kana han symbol cjk-misc bopomofo)) | |
(set-fontset-font (frame-parameter nil 'font) charset | |
(font-spec :family (car (cdr fonts))))) | |
;; Fix chinese font width and rescale | |
(setq face-font-rescale-alist '(("Microsoft Yahei" . 1.2) ("WenQuanYi Micro Hei Mono" . 1.2) ("STHeiti". 1.2))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment