From ef5d97edd59c9c45ce7a940d8791a41397142b3b Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 31 May 2021 12:39:17 +0000 Subject: [PATCH 1/2] added information about customizing fonts --- README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e676a2a..f23e7a0 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ and then call for the different modules. The only mandatory module is To install nano through [straight.el](https://github.com/raxod502/straight.el), install straight.el, and then add the following snippet into your emacs configuration: -``` +``` emacs-lisp (straight-use-package '(nano-emacs :type git :host github :repo "rougier/nano-emacs")) ``` @@ -65,6 +65,34 @@ from here, you may either `(require 'nano)` to pull in the default nano configuration, or call for the different modules. The only mandatory module is `nano-faces` that defines 6 faces that are used in other modules. +### Customization + +You can customize the default font, the proportional font and the font-size. + +```emacs-lisp +(setq nano-font-family-monospaced "Roboto Mono") +``` + +This sets the default monospaced font. Defaults to Roboto Mono. Note that if you set this to a font without proper light or bold weights you will lose many of the key design features of nano-emacs. + +```emacs-lisp +(setq nano-font-family-proportional nil) +``` + +Set this to the name of your favorite variable-width font to enable `variable-width-mode` and `mixed-pitch-mode`. If you have already set this somewhere else, you can use `(setq nano-font-family-proportional (face-attribute 'variable-width :family))` to use the same one. + +```emacs-lisp +(setq nano-font-size 14) +``` + +This sets the font-size of most faces in nano-emacs. + +#### Note about load-order + +Because of the way nano-emacs is set up, you need to set these variables /before/ you call `(nano-faces)` and `(nano-theme)`. If you change one of these variables after load/calling `(nano-faces)` and `(nano-theme)`, you will need to call them again for these changes to take effect. + + + ### Modules - **[nano.el](./nano.el)** (optional) From cbb3c72cfc53f6a7e620c1eb5c8622e790228ace Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 31 May 2021 12:42:11 +0000 Subject: [PATCH 2/2] Update README.md Don't know how to use Markdown apparently. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f23e7a0..094c845 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ This sets the default monospaced font. Defaults to Roboto Mono. Note that if you (setq nano-font-family-proportional nil) ``` -Set this to the name of your favorite variable-width font to enable `variable-width-mode` and `mixed-pitch-mode`. If you have already set this somewhere else, you can use `(setq nano-font-family-proportional (face-attribute 'variable-width :family))` to use the same one. +Set this to the name (as a string) of your favorite variable-width font to enable `variable-width-mode` and `mixed-pitch-mode`. If you have already set this somewhere else, you can use `(setq nano-font-family-proportional (face-attribute 'variable-width :family))` to use the same one. ```emacs-lisp (setq nano-font-size 14) @@ -89,7 +89,7 @@ This sets the font-size of most faces in nano-emacs. #### Note about load-order -Because of the way nano-emacs is set up, you need to set these variables /before/ you call `(nano-faces)` and `(nano-theme)`. If you change one of these variables after load/calling `(nano-faces)` and `(nano-theme)`, you will need to call them again for these changes to take effect. +Because of the way nano-emacs is set up, you need to set these variables *before* you call `(nano-faces)` and `(nano-theme)`. If you change one of these variables after load/calling `(nano-faces)` and `(nano-theme)`, you will need to call them again for these changes to take effect.