2

I like the colors from these beautiful themes, but I wish I could disable the font resizing.Here's an example.

1

If you really want to be heavy-handed about it, you could wipe out the :height attribute of every defined font except for default

(defvar face-height-whitelist nil
  "List of faces for which the :height attribute should be
  preserved by the function `remove-face-heights'")

;; source: http://emacs.stackexchange.com/a/23949/93
(defun remove-face-heights ()
  "Unset the :height attribute for every face except for
`default' and any faces listed in `face-height-whitelist'"
  (mapc
   (lambda (face)
     (unless (or (eq face 'default)
                 (memq face face-height-whitelist))
       (set-face-attribute face nil :height 'unspecified)))
   (face-list)))

(add-hook 'after-init-hook 'remove-face-heights)

Adding the above code to your init file would wipe out the :height attribute on any faces that are defined after emacs is initialized. If along the way you find out that there are some face heights that you want to preserve, you can add those faces to face-height-whitelist like this:

(add-to-list 'face-height-whitelist 'some-special-face)
0

I think the only way to do this is to set the :height attribute for the faces that you want to use. for example I have something like this in my config.

(defvar jat/default-font-size 100)
(set-face-attribute 'default nil :height jat/default-font-size)
(set-face-attribute 'org-document-title nil :height jat/default-font-size)
1
  • Note that you can use customize-face to edit a face and save it so that the edits are automatically restored on next launch; this saves you from having to edit your init file manually. Use M-x customize-face RET org-document-title RET, for instance – db48x Jun 13 '16 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.