[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-modern 1a97306a1d: Introduce separate org-modern-sy
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-modern 1a97306a1d: Introduce separate org-modern-symbol face |
Date: |
Sun, 20 Mar 2022 16:57:44 -0400 (EDT) |
branch: externals/org-modern
commit 1a97306a1da290c5efdf4dad64ef2be5e419ef7b
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Introduce separate org-modern-symbol face
This face is used to separately style stars, checkboxes and progress
indicators.
The face is useful when your default fonts doesn't give good results for
the symbols.
---
README.org | 1 +
org-modern.el | 24 +++++++++++++++++-------
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/README.org b/README.org
index 93c6ca9422..529a168cd3 100644
--- a/README.org
+++ b/README.org
@@ -74,6 +74,7 @@ screenshot above.
;; Choose some fonts
;; (set-face-attribute 'default nil :family "???")
;; (set-face-attribute 'variable-pitch nil :family "???")
+ ;; (set-face-attribute 'org-modern-symbol nil :family "Iosevka")
;; Add frame borders and window dividers
(modify-all-frames-parameters
diff --git a/org-modern.el b/org-modern.el
index c56f6fd196..ad97072290 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -118,9 +118,9 @@ Set to nil to disable styling list bullets."
:type '(alist :key-type character :value-type string))
(defcustom org-modern-checkbox
- '((?X . #("▢✓" 0 2 (composition ((2)))))
- (?- . #("▢–" 0 2 (composition ((2)))))
- (?\s . #("▢" 0 1 (composition ((1))))))
+ '((?X . "☑")
+ (?- . #("□–" 0 2 (composition ((2)))))
+ (?\s . "□"))
"List of check box replacement strings.
Set to nil to disable styling checkboxes."
:type '(alist :key-type character :value-type string))
@@ -168,6 +168,11 @@ Set to nil to disable the indicator."
:group 'org-faces
:group 'faces)
+(defface org-modern-symbol nil
+ "Face used for stars, checkboxes and progress indicators.
+You can specify a font `:family'. The font families `Iosevka', `Hack' and
+`DejaVu Sans' give decent results.")
+
(defface org-modern-label
`((t :height 0.9 :width condensed :weight regular :underline nil))
"Parent face for labels.")
@@ -241,8 +246,10 @@ Set to nil to disable the indicator."
(end (match-end 1)))
(put-text-property
beg end
- 'display (alist-get (char-after (1+ beg))
- org-modern-checkbox))))
+ 'display
+ (propertize (alist-get (char-after (1+ beg))
+ org-modern-checkbox)
+ 'face 'org-modern-symbol))))
(defun org-modern--statistics ()
"Prettify headline todo statistics."
@@ -256,7 +263,9 @@ Set to nil to disable the indicator."
(if (= q 0)
1.0
(/ (* 1.0 (string-to-number (match-string 3)))
q))))))))
- (setq label (concat (aref org-modern-progress idx) " " label))))
+ (setq label (concat (propertize (aref org-modern-progress idx)
+ 'face 'org-modern-symbol)
+ " " label))))
(setq label (concat " " label " "))
(add-text-properties (1- (match-beginning 1)) (1+ (match-end 1))
`(display ,label face org-modern-statistics))))
@@ -345,7 +354,8 @@ Set to nil to disable the indicator."
(match-beginning 2)
(match-end 2)
'display
- (aref org-modern-star (min (1- (length org-modern-star)) level)))))
+ (propertize (aref org-modern-star (min (1- (length org-modern-star))
level))
+ 'face 'org-modern-symbol))))
(defun org-modern--table ()
"Prettify vertical table lines."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org-modern 1a97306a1d: Introduce separate org-modern-symbol face,
ELPA Syncer <=