The idea is to redefine set-face-attribute
so that it sets face attributes normally except for the :weight
attribute, which shall always be set to normal
(the default value, I think). With this I hope to disable bold fonts in Emacs once and for all.
I got this:
(fset 'original-set-face-attribute (symbol-function 'set-face-attribute))
(defun set-face-attribute (face frame &rest args)
(progn
(original-set-face-attribute face frame args)))
So far, it doesn't work. If I do (make-face-bold 'default)
I get Wrong type argument: symbolp, (:weight bold)
. I think what I have
to do is remove elements that contain :weight
from the list of arguments
args
.
Alright! I improved on abo-abo's solution and this is what I've come up with:
It disables
:height
,:weight
and:box
attributes (this is configurable via theset-face-ignore-attributes
variable) for most fonts. For this to work, it has to go at the very beginning ofinit.el
before the font attributes are set.