Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable bold (font weight) globally in emacs?

Tags:

emacs

fonts

bold

I hate bold text while coding. Is it possible to disable bold text (and underline) in every single file and emacs's interface?

like image 903
alexchenco Avatar asked Jan 14 '10 14:01

alexchenco


People also ask

How do I change the default font in Emacs?

You can use the menu bar. Go to Options -> Set Default Font... . After you choose a font, don't forget to press Options -> Save Options —otherwise your new font will not be saved after you close Emacs.

Can you set the font weight property to make the declarations look bold?

You can use the CSS declaration font-weight: bold; .

What is bold font weight?

bold. Font weight progression: 100 (extra light) - 200 - 300 - 400 (normal) - 500 - 600 - 700 (bold) - 800 - 900.

How do I reduce the boldness of text in CSS?

font-weight: lighter; - uses a weight of the font that is less than "normal" if the font contains this weight. Fallback is the use of the "normal" weight. font-weight: inherit; -- Inherits the weight of the parent element. font-weight: initial; -- uses the default weight of the font.


1 Answers

The easiest way is probably

(set-face-bold-p 'bold nil)

Another possibility, which also deals with underlines, would be to evaluate the following snippet in a running Emacs session:

 (mapc
  (lambda (face)
    (set-face-attribute face nil :weight 'normal :underline nil))
  (face-list))
like image 139
pokita Avatar answered Oct 01 '22 06:10

pokita