+emacs+字体选择
方正宋刻本秀楷M的粗细度刚好与Cascadia Code SemiLight配合;
方正聚珍新仿的粗细度与Cascadia Code Light刚好一致
汉仪书仿55S是传统的仿宋字型,但是粗细度比默认的仿宋好很多,有5个字重可调
搭配上Windows的Emacs 31版本新增的Direct Write支持,显示效果挺不错的。
(defun set-font (english chinese english-size chinese-size) (set-face-attribute 'default nil :font (format "%s:pixelsize=%d" english english-size) ;; (font-spec :family english :size english-size :weight 'semi-light) ) (set-face-attribute 'fixed-pitch nil :font (format "%s:pixelsize=%d" english english-size) ;; (font-spec :family english :size english-size :weight 'semi-light) ) (set-face-attribute 'variable-pitch nil :font (format "%s:pixelsize=%d" english english-size)) (dolist (charset '(kana han cjk-misc bopomofo)) (set-fontset-font (frame-parameter nil 'font) charset (font-spec :family chinese :size chinese-size)))) (set-font "IBM Plex Mono" "FangSongCode" 40 40) (set-fontset-font t 'emoji (font-spec :family "Segoe UI Emoji") nil 'prepend) (set-fontset-font t 'symbol (font-spec :family "Cascadia Mono NF SemiLight") nil 'prepend)