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

Added options to use custom font, variable pitch font, and custom font easily customizable font size. #77

Merged
merged 5 commits into from
May 31, 2021

Conversation

tefkah
Copy link
Contributor

@tefkah tefkah commented May 27, 2021

Hi! I've been using nano on and off, as while I really like the design philosophy, I really like using variable-pitch fonts while writing, which are unfortunately a little hard to use with nano as it does not play well with variable-pitch-mode or mixed-pitch-mode.
This PR is to "fix" that.

It does a couple of things, not all of which you may be a fan of as you mentioned in #18 , but I think at least some elements might be worthwile:

  • Removes the hard-coded font definition from nano-layout
  • Removes the hard-coded font definition from the nano-faces, instead delagating this to nano-default-face
  • Adds a customization option for the font size, defaults to 14.
  • Adds a customization option for the default font family. This still defaults to Roboto Mono, but is now customizable, with a warning that other fonts may not work.
  • Adds nano-face-variable-pitch and the accompanying variable nano-family-variable-pitch, which, if set, sets variable-pitch to this face, allowing variable-pitch-mode to work properly.

All faces visible in this image. It works very well, have not yet encountered any problems.
image

Let me know what you think! I'm very happy that I can use nano with variable pitch now, I hope this might be useful to others who would like to as well. :) Thank you again for nano-emacs, it's really a delight.

@tefkah
Copy link
Contributor Author

tefkah commented May 27, 2021

I have not yet tested this with all of the modules in nano-emacs, as I don't use mu4e and nano-writer does not jive well with my own org config, but I will try to test a few of them.

@tefkah tefkah changed the title Added opiton to use custom font, variable pitch font, and custom font easily customizable font size. Added options to use custom font, variable pitch font, and custom font easily customizable font size. May 27, 2021
@rougier
Copy link
Owner

rougier commented May 28, 2021

Thanks. I think it make sense to re-establish the variable pitch mode and I'll probably merge your PR.

I've just a few comments. Concerning the nano-font-size, what is the use exactly ? Because once you've started Emacs, this won't actually change the font size or will it?

Also, in the tag face definition, there's a font size "120" which corresponds to 85% of the default font size (rounded to nearest integer).

Also, for the font family names, maybe we could use nano-font-family-monospaced and nano-font-family-proportional

@tefkah
Copy link
Contributor Author

tefkah commented May 29, 2021

nano-font-size wont change the font immediately, but if you call (nano-faces) (nano-theme) it will. Might be worth having an interactive function that does this, say "nano-refresh. as I find myself calling it quite often. I will include that in the docstring and create that function in the pr concerning #26!

Ah, I missed that definition, I'll change it.

Those sound better indeed, I've changed them.

@rougier
Copy link
Owner

rougier commented May 31, 2021

Thank!

@rougier rougier merged commit 0102fdd into rougier:master May 31, 2021
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

Successfully merging this pull request may close these issues.

2 participants