5

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.

ajallooe
  • 103
  • 1
  • 4
  • Nevermind. I found the answer form [here](https://www.ianjones.us/variable-spaced-fonts). – ajallooe Jan 25 '21 at 03: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 '21 at 15:09
  • @ajallooe's link above is dead, but the original webpage is archived [here](http://web.archive.org/web/20200806123812/https://www.ianjones.us/variable-spaced-fonts). – Pablo May 04 '22 at 01:59

1 Answers1

2

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.

ajallooe
  • 103
  • 1
  • 4