1 个赞
我居然把信息看完了
发现sublime下的中文字体和emacs purcell的一样,
不过通过方法解决:
Preferences menu >> Settings
{
...
"font_options": ["gdi"],
...
}
1 个赞
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font)
charset
(font-spec :family "Microsoft Yahei UI" :size 30)))
FROM https://gist.github.com/Superbil/7113937
;;; base on https://gist.github.com/coldnew/7398835
(defvar emacs-english-font nil
"The font name of English.")
(defvar emacs-cjk-font nil
"The font name for CJK.")
(defvar emacs-font-size-pair nil
"Default font size pair for (english . chinese)")
(defvar emacs-font-size-pair-list nil
"This list is used to store matching (englis . chinese) font-size.")
(defun font-exist-p (fontname)
"test if this font is exist or not."
(if (or (not fontname) (string= fontname ""))
nil
(if (not (x-list-fonts fontname))
nil t)))
(defun set-font (english chinese size-pair)
"Setup emacs English and Chinese font on x window-system."
(if (font-exist-p english)
(set-frame-font (format "%s:pixelsize=%d" english (car size-pair)) t))
(if (font-exist-p chinese)
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font) charset
(font-spec :family chinese :size (cdr size-pair))))))
(defun emacs-step-font-size (step)
"Increase/Decrease emacs's font size."
(let ((scale-steps emacs-font-size-pair-list))
(if (< step 0) (setq scale-steps (reverse scale-steps)))
(setq emacs-font-size-pair
(or (cadr (member emacs-font-size-pair scale-steps))
emacs-font-size-pair))
(when emacs-font-size-pair
(message "emacs font size set to %.1f" (car emacs-font-size-pair))
(set-font emacs-english-font emacs-cjk-font emacs-font-size-pair))))
(defun increase-emacs-font-size ()
"Decrease emacs's font-size acording emacs-font-size-pair-list."
(interactive) (emacs-step-font-size 1))
(defun decrease-emacs-font-size ()
"Increase emacs's font-size acording emacs-font-size-pair-list."
(interactive) (emacs-step-font-size -1))
(setq list-faces-sample-text
(concat
"ABCDEFTHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz\n"
"11223344556677889900 壹貳參肆伍陸柒捌玖零"))
(when window-system
;; setup change size font, base on emacs-font-size-pair-list
(global-set-key (kbd "C-M-=") 'increase-emacs-font-size)
(global-set-key (kbd "C-M--") 'decrease-emacs-font-size)
;; setup default english font and cjk font
(setq emacs-english-font "consolas")
(setq emacs-cjk-font "Microsoft Yahei UI")
(setq emacs-font-size-pair '(20 . 22))
(setq emacs-font-size-pair-list '(( 5 . 6) (10 . 12)
(13 . 16) (15 . 18) (17 . 20)
(19 . 22) (20 . 24) (21 . 26)
(24 . 28) (26 . 32) (28 . 34)
(30 . 36) (34 . 40) (36 . 44)))
;; Setup font size based on emacs-font-size-pair
(set-font emacs-english-font emacs-cjk-font emacs-font-size-pair))
1 个赞
;; extract from my ~/.emacs.d/custom.el
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "Consolas" :foundry "outline" :slant normal :weight normal :height 150 :width normal)))))
;; support emacs
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font)
charset
(font-spec :family "Microsoft Yahei UI" :size 22)))
我看过这篇文章, 我觉得和这个问题无关…
我也遇到这个问题,谢谢了。另外问下,我用的Purcell的配置,启动时每次都要等很久,特别是org mode。操作系统时Win10 1903 版本。