cstby / fixed-pitch-mode

Use a proportional typeface globally while keeping a monospaced typeface for code in Emacs
GNU General Public License v3.0
48 stars 0 forks source link

Do I need to enable variable-pitch-mode? #4

Open oatmealm opened 1 year ago

oatmealm commented 1 year ago

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...

jeff-phil commented 7 months ago

@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.

gety9 commented 7 months ago

@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

cstby commented 7 months ago

@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.