Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
oatmealm opened this issue Feb 19, 2023 · 3 comments
Open

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

oatmealm opened this issue Feb 19, 2023 · 3 comments

Comments

@oatmealm
Copy link

oatmealm commented Feb 19, 2023

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
Copy link

@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
Copy link

gety9 commented Jan 26, 2024

@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
Copy link
Owner

cstby commented Feb 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants