I have the following in my config:
;; set a non programming font for text
(when (member "Lucida Sans Unicode" (font-family-list))
(set-face-attribute 'variable-pitch nil :font "Lucida Sans Unicode"))
;; set a default font
(when (member "Cascadia Code" (font-family-list))
(set-face-attribute 'default nil :font "Cascadia Code")
(set-face-attribute 'fixed-pitch nil :font "Cascadia Code"))
;; specify font for all unicode characters
(when (member "DejaVu Sans Mono" (font-family-list))
(set-fontset-font t 'unicode "DejaVu Sans Mono" nil 'prepend))
(add-hook 'org-mode-hook 'variable-pitch-mode)
(custom-theme-set-faces
'user
'(org-code ((t (:inherit (shadow fixed-pitch))))))
This gives me the following result:
As you can see, under the header Fonts that is in the font Lucida Sans Unicode
, there is a line
: ezaeaz
that is correctly displayed in Cascadia Code
.
However, when I increase the font size with Ctrl + mouse wheel
or by using C-x C-+
, here is what happens:
Org-mode being in variable pitch, the default font for the mode is Lucida Sans Unicode
, which scaled up correctly. However the Cascadia Code
font didn't, I assume because of the custom-theme-set-faces
call that forces it to be something.
How can I make it so that both fonts are always the same size, or a ratio of one another?