How to find out current font used in my Emacs?
Asked
Active
Viewed 3.3k times
4 Answers
25
Different fonts can be used for different characters and different parts of the buffer. For a given character, you can find out which font was used by moving point to that character than then doing C-u C-x = which will give you all kinds of information about that position in the buffer, including which font was used for it.
Stefan
- 1,399
17
You can just evaluate
(face-attribute 'default :font)
To evaluate a sexp, do M-:, type/paste the above sexp in there and hit enter.
Kaushal Modi
- 323
4
Place cursor on text which you want to customize and run M-x describe-face.
It will give you information how this font was set, i.e. markdown-pre-face. You can then see that it inhertis from markdown-code-face which inherits from fixed-pitch.
And this is how you can set it:
(set-face-attribute 'default nil
:family "Source Code Pro"
:height 130
:weight 'normal
:width 'normal)
(copy-face 'default 'fixed-pitch)
Restart Emacs after setting it.
rofrol
- 2,001
- 19
- 17