我atl x 输入font 发现有这个命令 set frame font
但他只能修改英文字体,这是啥情况
谢谢。
这样就是设置中文了:
(set-fontset-font t '(#x4e00 . #x9fff) "Microsoft Yahei")
你可以参考下Centaur 的配置
;;; custom.el --- user customization file -*- lexical-binding: t no-byte-compile: t -*-
;;; Commentary:
;;; Add or change the configurations in custom.el, then restart Emacs.
;;; Put your own configurations in custom-post.el to override default configurations.
;;; Code:
;; (setq centaur-logo nil) ; Logo file or nil (official logo)
;; (setq centaur-full-name "user name") ; User full name
;; (setq centaur-mail-address "[email protected] ") ; Email address
;; (setq centaur-proxy "127.0.0.1:7890") ; HTTP/HTTPS proxy
;; (setq centaur-socks-proxy "127.0.0.1:7890") ; SOCKS proxy
;; (setq centaur-server nil) ; Enable `server-mode' or not: t or nil
;; (setq centaur-icon nil) ; Display icons or not: t or nil
;; (setq centaur-package-archives 'melpa) ; Package repo: melpa, emacs-cn, bfsu, netease, sjtu, tencent, tuna or ustc
;; (setq centaur-theme 'auto) ; Color theme: auto, random, system, default, pro, dark, light, warm, cold, day or night
;; (setq centaur-completion-style 'minibuffer) ; Completion display style: minibuffer or childframe
;; (setq centaur-dashboard nil) ; Display dashboard at startup or not: t or nil
;; (setq centaur-restore-frame-geometry nil) ; Restore the frame's geometry at startup: t or nil
;; (setq centaur-lsp 'eglot) ; Set LSP client: lsp-mode, eglot or nil
;; (setq centaur-lsp-format-on-save t) ; Auto format buffers on save: t or nil
This file has been truncated. show original
这样可读性强一些
(set-fontset-font t 'han "Noto Sans CJK SC Regular")
(set-fontset-font t 'kana "Noto Sans CJK JP Regular")
(set-fontset-font t 'hangul "Noto Sans CJK KR Regular")
(set-fontset-font t 'cjk-misc "Noto Sans CJK KR Regular")
参考
https://archive.casouri.cat/note/2019/emacs-字体与字体集/index.html
( 这文章写的真好建议全文背诵)
6 个赞