fixed-pitch-mode
fixed-pitch-mode copied to clipboard
Do I need to enable variable-pitch-mode?
Slightly confused. Don't I also need to enable variable-pitch-mode
to actually have the propotional fonts used? I don't see in the code that it's enabled anywhere...
@oatmealm Looks like you set the default (font or frame, etc.) as variable pitch, and then set fixed-pitch-mode where or when you don't want that default.
@oatmealm
No, to have proportional fonts (and enable this package) all you need to do is set variable font (as your default font) in your init.el :
(setq-default default-frame-alist '((font . "Helvetica-12")))
Then if you want to style how your proportional font will look like (and also mono font) you can use faces:
(custom-set-faces '(fixed-pitch ((t (:family "Monego" :height 105))))
'(variable-pitch ((t (:family "Crimson Pro" :height 140)))))
Majority of buffers will use your variable font, some (already specified by this package) will use your mono font, if you want to specifiy more buffers which must use your mono font use white list feature:
(setq fixed-pitch-whitelist-hooks
'(cider-mode-hook
cider-docview-mode-hook
cider-popup-buffer-mode
cider-test-report-mode-hook
cider-repl-mode-hook))
If you want to switch fast (temporary) in some buffer do M-x fixed pitched mode
@oatmealm Does the explanation from @gety9 help? They are absolutely right about how this package functions. You only need to load the package and then (optionally) add hooks for modes were you want to use a monospaced font.