How to set the font size in Emacs?

前端 未结 17 1633
囚心锁ツ
囚心锁ツ 2020-11-28 17:43

I also want to save the font size in my .emacs file.

17条回答
  •  一向
    一向 (楼主)
    2020-11-28 18:03

    Here's a snippet that lets you directly specify the global font size using an interactive function:

    (defun set-font-size ()
        "Set the font size."
      (interactive)
      (set-face-attribute
       'default nil :height
       (string-to-number
        (read-string "Font size: " (number-to-string (face-attribute 'default :height nil))))))
    

提交回复
热议问题