hua*_*uan 392
(set-face-attribute 'default nil :height 100)
Run Code Online (Sandbox Code Playgroud)
该值为1/10pt,因此100将给你10pt等.
Joh*_*itb 41
M-x customize-face RET default将允许您设置default面部,所有其他面部基于该面部.在那里你可以设置font-size.
这是我的.emacs中的内容.实际上,颜色主题将设置基础,然后我的自定义面部设置将覆盖一些东西.custom-set-faces由emacs的自定义面机制编写:
;; my colour theme is whateveryouwant :)
(require 'color-theme)
(color-theme-initialize)
(color-theme-whateveryouwant)
(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 (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "unknown" :family "DejaVu Sans Mono"))))
'(font-lock-comment-face ((t (:foreground "darkorange4"))))
'(font-lock-function-name-face ((t (:foreground "navy"))))
'(font-lock-keyword-face ((t (:foreground "red4"))))
'(font-lock-type-face ((t (:foreground "black"))))
'(linum ((t (:inherit shadow :background "gray95"))))
'(mode-line ((t (nil nil nil nil :background "grey90" (:line-width -1 :color nil :style released-button) "black" :box nil :width condensed :foundry "unknown" :family "DejaVu Sans Mono")))))
Run Code Online (Sandbox Code Playgroud)
rav*_*404 36
这是另一个简单的解决方案 也适用于24
(set-default-font "Monaco 14")
Run Code Online (Sandbox Code Playgroud)
捷径:
`C-+` increases font size
`C--` Decreases font size
Run Code Online (Sandbox Code Playgroud)
Chr*_*way 14
我有以下内容.emacs:
(defun fontify-frame (frame)
(set-frame-parameter frame 'font "Monospace-11"))
;; Fontify current frame
(fontify-frame nil)
;; Fontify any future frames
(push 'fontify-frame after-make-frame-functions)
Run Code Online (Sandbox Code Playgroud)
您可以替换您选择的任何字体"Monospace-11".可用选项集与系统高度相关.使用M-x set-default-font和查看选项卡完成将为您提供一些想法.在我的系统,使用Emacs 23和启用抗锯齿,可以选择按名称,例如,系统字体Monospace,Sans Serif等等.
zoom.cfg和global-zoom.cfg提供字体大小更改绑定(来自EmacsWiki)
以下是交互式调整字体高度大小的选项,一次一个:
;; font sizes
(global-set-key (kbd "s-=")
(lambda ()
(interactive)
(let ((old-face-attribute (face-attribute 'default :height)))
(set-face-attribute 'default nil :height (+ old-face-attribute 10)))))
(global-set-key (kbd "s--")
(lambda ()
(interactive)
(let ((old-face-attribute (face-attribute 'default :height)))
(set-face-attribute 'default nil :height (- old-face-attribute 10)))))
Run Code Online (Sandbox Code Playgroud)
当您想要调整所有缓冲区中的文本大小时,这是首选.我不喜欢使用解决方案text-scale-increase,text-scale-decrease因为排水沟中的行号可能会被切断.
小智 6
Firefox和其他程序允许您使用C- +和C--增加和减少字体大小.我设置了我的.emacs,以便通过添加以下代码行来获得相同的能力:
(global-set-key [C-kp-add] 'text-scale-increase)
(global-set-key [C-kp-subtract] 'text-scale-decrease)
Run Code Online (Sandbox Code Playgroud)
水上运动:
(set-face-attribute 'default nil :font "Monaco-16" )
Run Code Online (Sandbox Code Playgroud)
从 Emacs Wiki Globally Change the Default Font,它说您可以使用以下任一方式:
(set-face-attribute 'default nil :font FONT )
(set-frame-font FONT nil t)
Run Code Online (Sandbox Code Playgroud)
哪里FONT有类似的东西"Monaco-16",例如:
(set-face-attribute 'default nil :font "Monaco-16" )
Run Code Online (Sandbox Code Playgroud)
wiki 上的第一个建议中有一个额外的右括号,导致启动时出错。我终于注意到了额外的右括号,随后我更正了维基上的建议。然后这两个建议都对我有用。
| 归档时间: |
|
| 查看次数: |
185853 次 |
| 最近记录: |