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,:weightand:boxattributes (this is configurable via theset-face-ignore-attributesvariable) for most fonts. For this to work, it has to go at the very beginning ofinit.elbefore the font attributes are set.