1

I am trying to use a variable-pitch font for Org-mode:

(add-hook! 'org-mode-hook #'mixed-pitch-mode)

I am specifying a variable pitch font that is normally renders much smaller than the fixed pitch one:

(setq doom-font (font-spec :family "Fira Code" :style "Retina" :size 14)
      doom-variable-pitch-font (font-spec :family "ETBembo")
      doom-big-font (font-spec :family "Fira Code" :style "Retina" :size 24))

However, no matter what I do I cannot change the size of the default text face in Org mode. I can change size for title, org-levels, etc. but not the default text font. I've tried this:

(setq doom-font (font-spec :family "Fira Code" :style "Retina" :size 14)
      doom-variable-pitch-font (font-spec :family "ETBembo" :height 1.3)
      doom-big-font (font-spec :family "Fira Code" :style "Retina" :size 24))

and this:

(setq doom-font (font-spec :family "Fira Code" :style "Retina" :size 14)
      doom-variable-pitch-font (font-spec :family "ETBembo" :size 18)
      doom-big-font (font-spec :family "Fira Code" :style "Retina" :size 24))

and even this:

(after! org (custom-set-faces! '(org-default :weight normal :slant normal :height 2.9)))

and it still fails. Can somebody help me?

screenshot: I want to make normal text font match level3+ heading size so it would look the same size as the font for the code block.

2
  • Nevermind. I found the answer form here. – ajallooe Jan 25 at 3:03
  • Can you please post the relevant parts of your resulting config? having the same problem with variable-font size being ignored and even the mixed-pitch solution from the link you posted doesn't seem to change anything. (also, are you able to change the font\size on the fly - without doing a full doom/reload?) – whoever Jan 27 at 15:09
0

I found the answer. Doing this does the trick:

(use-package! mixed-pitch
  :hook (org-mode . mixed-pitch-mode)
  :config
  (setq mixed-pitch-set-heigth t)
  (set-face-attribute 'variable-pitch nil :height 1.3))

I have set the height for my normal font to 1.0:

(setq doom-font (font-spec :family "Fira Code" :style "Retina" :size 14 :height 1.0)
      doom-variable-pitch-font (font-spec :family "ETBembo" :style "RomanOSF" :height 1.3)
      doom-big-font (font-spec :family "Fira Code" :style "Retina" :size 24))

Reference: I found this from this link.

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.