Mix Monospace and Variable Fonts in Doom Emacs

Doom Emacsallows you to set the font you want to use using the variable doom-font in your config.el file. However, if you set this font to a non-monospaced font you will run into problems with formatted ASCI elements, like the splashscreen or tables, looking askew due to the variable font spacing.

Installing the mixed-pitch package will fix this problem. Emacs will use your doom-variable-pitch-font variable for most text, but for areas where a mono-spaced font is expected it will use the font set in doom-font.

You can install this by adding mixed-pitch to your packages.el file (package! mixed-pitch) and adding this declaration to config.el:

(use-package! mixed-pitch
  ;; If you want it in all text modes:
  (text-mode . mixed-pitch-mode))


Content is copyrighted 2019-2023 © D.S. Chapman. This site was built using GatsbyJS. Code for this website is open source and available on Github