Skip to content

Commit

Permalink
Changed tag size and face-names, updated docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
tefkah committed May 29, 2021
1 parent 1136b86 commit fcb81e7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
42 changes: 31 additions & 11 deletions nano-faces.el
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@



(defcustom nano-family "Roboto Mono"
(defcustom nano-font-family-monospaced "Roboto Mono"
"Name of the font-family to use for nano.
Defaults to Roboto Mono. Customizing this might lead to conflicts
if the family does not have sufficient bold/light etc faces."
:group 'nano
:type 'string)

(defcustom nano-family-variable-pitch nil
(defcustom nano-font-family-proportional nil
"Font to use for variable pitch faces.
Setting this allows nano to display variable pitch faces when,
for instance, 'variable-pitch-mode' or 'mixed-pitch-mode' is active in a buffer.
Expand All @@ -49,7 +49,9 @@ Defaults to nil."
:type 'string)

(defcustom nano-font-size 14
"Default value for the font size of nano-theme in pt units."
"Default value for the font size of nano-theme in pt units.
Note: to change this after startup, call
\(nano-faces\) and \(nano-themes\)."
:group 'nano
:type 'integer)

Expand Down Expand Up @@ -186,7 +188,7 @@ background color that is barely perceptible."
(set-face-attribute 'nano-face-default nil
:foreground nano-color-foreground
:background nano-color-background
:family nano-family
:family nano-font-family-monospaced
:height (* nano-font-size 10))
(set-face-attribute 'nano-face-critical nil
:foreground nano-color-foreground
Expand All @@ -197,7 +199,7 @@ background color that is barely perceptible."
(set-face-attribute 'nano-face-variable-pitch nil
:foreground (face-foreground 'nano-face-default)
:background (face-background 'nano-face-default)
:family nano-family-variable-pitch
:family nano-font-family-proportional
:height (* nano-font-size 10))
(if (display-graphic-p)
(set-face-attribute 'nano-face-strong nil
Expand Down Expand Up @@ -229,7 +231,10 @@ background color that is barely perceptible."
:foreground nano-color-foreground
:background nano-color-background
:weight 'regular
:height (if (display-graphic-p) 120 1)
:height (if (display-graphic-p)
(round
(* 0.85 (* 10 nano-font-size)))
1)
:box `(:line-width 1
:color ,nano-color-foreground
:style nil))
Expand All @@ -246,7 +251,10 @@ background color that is barely perceptible."
:foreground nano-color-strong
:background nano-color-subtle
:weight 'regular
:height (if (display-graphic-p) 120 1)
:height (if (display-graphic-p)
(round
(* 0.85 (* 10 nano-font-size)))
1)
:box `(:line-width 1
:color ,nano-color-strong
:style nil))
Expand All @@ -262,7 +270,10 @@ background color that is barely perceptible."
:foreground nano-color-background
:background nano-color-salient
:weight 'regular
:height (if (display-graphic-p) 120 1)
:height (if (display-graphic-p)
(round
(* 0.85 (* 10 nano-font-size)))
1)
:box `(:line-width 1
:color ,nano-color-salient
:style nil))
Expand All @@ -278,7 +289,10 @@ background color that is barely perceptible."
:foreground nano-color-background
:background nano-color-popout
:weight 'regular
:height (if (display-graphic-p) 120 1)
:height (if (display-graphic-p)
(round
(* 0.85 (* 10 nano-font-size)))
1)
:box `(:line-width 1
:color ,nano-color-popout
:style nil))
Expand All @@ -294,7 +308,10 @@ background color that is barely perceptible."
:foreground nano-color-background
:background nano-color-faded
:weight 'regular
:height (if (display-graphic-p) 120 1)
:height (if (display-graphic-p)
(round
(* 0.85 (* 10 nano-font-size)))
1)
:box `(:line-width 1
:color ,nano-color-faded
:style nil))
Expand All @@ -311,7 +328,10 @@ background color that is barely perceptible."
:foreground nano-color-background
:background nano-color-critical
:weight 'regular
:height (if (display-graphic-p) 120 1)
:height (if (display-graphic-p)
(round
(* 0.85 (* 10 nano-font-size)))
1)
:box `(:line-width 1
:color ,nano-color-critical
:style nil))
Expand Down
2 changes: 1 addition & 1 deletion nano-theme.el
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
;;(set-face 'fixed-pitch 'default)
(set-face 'fixed-pitch-serif 'nano-face-default)
(set-face 'cursor 'nano-face-default)
(if 'nano-face-family-variable-pitch
(if 'nano-font-family-proportional
(set-face-attribute 'variable-pitch nil ;; to work with mixed-pitch
:foreground (face-foreground 'default)
:background (face-background 'default)
Expand Down

0 comments on commit fcb81e7

Please sign in to comment.