6

I want to set a different font for org-mode contents. Strangely, setting

'(org-level-1 ((t (:inherit variable-pitch))))

has the effect on headers as intended. However, setting

'(org-default ((t (:inherit variable-pitch))))

does not impact the text on normal org-mode text. They're still fixed-width font.

If I run describe-face on those text, it just says default instead of org-default. Not sure if that's the normal behavior.

How can I manually set font for normal org-mode content text?

xji
  • 2,635
  • 18
  • 38
  • 1
    It looks like the answer is on the mailing list -- i.e., buffer-face-mode needs to be enabled for buffer-local face settings such as changing the 'default: http://comments.gmane.org/gmane.emacs.orgmode/84250 – lawlist Aug 18 '15 at 03:44
  • @lawlist That worked. Unfortunately it seems to turn everything within org-mode into variable-pitch... not only the normal texts. – xji Aug 18 '15 at 04:01
  • @lawlist the OP is correct, buffer-face-mode changes all faces – Richard Border Jan 17 '17 at 21:30
  • Why not use variable-pitch-mode for this? (add-hook 'org-mode-hook (lambda () (variable-pitch-mode t))) – Timm Jan 17 '17 at 22:18
  • @RichardBorder Actually I even forgot I asked this question. I already found a solution to what I need by using a combination of `variable-pitch-mode and customized face settings. You can see the related questions at http://stackoverflow.com/a/16819449/1460448 and http://emacs.stackexchange.com/questions/14824/org-block-background-font-not-having-effect/14886 – xji Jan 18 '17 at 09:50
  • @RichardBorder Well maybe this question still has its value on its own. But my point is that my original problem could be solved in a different way already, so I'm no longer really concerned with this specific question about org-default face. – xji Jan 18 '17 at 09:51
  • @Timm Yeah I indeed solved my original problem with variable-pitch-mode. I guess this specific question about org-default face can still have some value on its own though. – xji Jan 18 '17 at 09:56
  • @Mallory-Erik Thank you very much for the headsup! I need to renew the SSL certificate from letsencrypt from time to time. Apparently the renewal process hit some snags... I'll deal with that as soon as possible. – xji Jan 28 '18 at 14:18

0 Answers0