branch: externals/indent-bars
commit 0638ba1ace061d20efde82a50a89a4f00b431739
Author: Yuwei Tian <[email protected]>
Commit: Yuwei Tian <[email protected]>
Customize the font weight of the no-stipple character
---
indent-bars.el | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/indent-bars.el b/indent-bars.el
index 8ce140ba9d..4d30ac8431 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -336,6 +336,17 @@ specifies using character bars exclusively. See
:type 'char
:group 'indent-bars)
+(defcustom indent-bars-no-stipple-char-font-weight nil
+ "Font weight to use to draw the character bars.
+If weight is nil or unspecified, a regular font is assumed.
+If non-nil, set the no-stipple character font weight accordingly."
+ :type `(choice
+ (const nil)
+ (const unspecified)
+ ,@(mapcar (lambda (item) (list 'const (aref item 1)))
+ font-weight-table))
+ :group 'indent-bars)
+
(defcustom indent-bars-unspecified-bg-color "black"
"Color to use as the frame background color if unspecified.
Unless actively set, most terminal frames do not have a
@@ -571,8 +582,10 @@ Create for character size W x H with offset ROT."
(defun indent-bars--calculate-face-spec (depth)
"Calculate the face spec for indentation bar at an indentation DEPTH.
DEPTH starts at 1."
- `((t . ( :inherit indent-bars-stipple
- :foreground ,(indent-bars--get-color depth)))))
+ `((t . (:inherit indent-bars-stipple
+ ,@(when indent-bars-no-stipple-char-font-weight
+ `(:weight ,indent-bars-no-stipple-char-font-weight))
+ :foreground ,(indent-bars--get-color depth)))))
(defun indent-bars--create-faces (num &optional redefine)
"Create bar faces up to depth NUM, redefining them if REDEFINE is non-nil.