Mix fixed-pitch and variable-pitch fonts in Emacs
Emacs Lisp
Switch branches/tags
Nothing to show
Latest commit 6a4fbb9 Jul 23, 2017 @jabranham jabranham Require emacs >= 24.3
Permalink
Failed to load latest commit information.
screenshots
LICENSE
README.org
mixed-pitch.el

README.org

Mixed Pitch

Mixed pitch is a minor mode that enables mixing fixed-pitch (also known as fixed-width or monospace) and variable-pitch (AKA “proportional”) fonts. It tries to be smart about which fonts get which face. Fonts that look like code, org-tables, and such remain fixed-pitch and everything else becomes variable-pitch. The variable mixed-pitch-fixed-pitch-faces is a list of faces that will remain fixed-pitch in mixed-pitch-mode:

screenshots/screenshot_20170712_202445.png

Installation

mixed-pitch is on MELPA. Set up MELPA and then you can simply do M-x package-install mixed-pitch.

Configuration

If you use use-package:

(use-package mixed-pitch
  :ensure t
  :config
  ;; If you want it in all text modes:
  (add-hook 'text-mode-hook #'mixed-pitch-mode)
  ;; Depending on your specific setup, you may want to adjust the height of
  ;; variable pitch fonts:
  (set-face-attribute 'variable-pitch :height 160))