I want to use a variable pitch face when using org mode (for composing articles, prose, etc.) The emacs wiki suggested using buffer face mode with a hook to set the face for org mode buffers:
;; Use variable width font faces in certain buffers (defun my-buffer-face-mode-variable () "Set font to a variable width (proportional) fonts in current buffer" (interactive) (setq buffer-face-mode-face '(:family "Liberation Serif" )) (buffer-face-mode)) ;; Set default font faces for org modes (add-hook 'org-mode-hook 'my-buffer-face-mode-variable)
This correctly changes the buffer face to variable-width, but seems to break org mode indentation.
Without buffer face mode, the buffer uses the default fixed pitch face for text and a variable pitch face for headers (as defined by the theme.) The resulting indentation is correct:
With buffer face mode both text and header use variable pitch face, but breaks indentation of all but the first line of headers:
Perhaps there is a conflict using variable pitch faces with indentation or with visual line mode, which I also use?
(with-eval-after-load 'org (setq org-startup-indented t) (add-hook 'org-mode-hook #'visual-line-mode))