fix font fallback

This commit is contained in:
2025-07-07 15:03:09 +02:00
parent 1ac3deddbc
commit d5ed7d10f3
2 changed files with 71 additions and 34 deletions

View File

@@ -508,8 +508,12 @@ Suggest the URL title as a description for resource."
;; (?I . "Important")))
;; 🅰 🅱 🅲 🅳
(setq org-fancy-priorities-list
(cond
;; ,(nerd-icons-mdicon "nf-md-alpha_a_box_outline")
;; ,(nerd-icons-mdicon "nf-md-alpha_b_box_outline")
;; ,(nerd-icons-mdicon "nf-md-alpha_c_box_outline")
;; ,(nerd-icons-mdicon "nf-md-alpha_d_box_outline")
((find-font (font-spec :family "Symbols Nerd Font Mono"))
`((?A . ,#("󰯫" 0 1 (face (:family "Symbols Nerd Font Mono" :height 1.0)
font-lock-face (:family "Symbols Nerd Font Mono" :height 1.0)
display (raise 0.10) rear-nonsticky t)))
@@ -522,8 +526,11 @@ Suggest the URL title as a description for resource."
(?D . ,#("󰯴" 0 1 (face (:family "Symbols Nerd Font Mono" :height 1.0)
font-lock-face (:family "Symbols Nerd Font Mono" :height 1.0)
display (raise 0.10) rear-nonsticky t)))))
(t '("🅰" "🅱" "🅲" "🅳")) ))
;; IndianRed1 DeepSkyBlue1
(setq org-priority-faces
(cond
((find-font (font-spec :family "Symbols Nerd Font Mono"))
`((?A :foreground "#df5f5f"
:height ,(- (face-attribute 'default :height) -5))
(?B :foreground "DarkOrange1"
@@ -536,7 +543,21 @@ Suggest the URL title as a description for resource."
(?2 :foreground "DarkOrange1")
(?3 :foreground "yellow1")
(?4 :foreground "green1")
(?I :foreground "#df5f5f" :weight 'bold))))
(?I :foreground "#df5f5f" :weight 'bold)))
(t
`((?A :foreground "#df5f5f"
:height ,(- (face-attribute 'default :height) 10))
(?B :foreground "DarkOrange1"
:height ,(- (face-attribute 'default :height) 10))
(?C :foreground "yellow1"
:height ,(- (face-attribute 'default :height) 10))
(?D :foreground "green1"
:height ,(- (face-attribute 'default :height) 10))
(?1 :foreground "#df5f5f" :weight 'bold)
(?2 :foreground "DarkOrange1")
(?3 :foreground "yellow1")
(?4 :foreground "green1")
(?I :foreground "#df5f5f" :weight 'bold))) ))
(use-package org-fragtog
:hook (org-mode . org-fragtog-mode))
@@ -637,7 +658,12 @@ Suggest the URL title as a description for resource."
(setq org-superstar-leading-bullet " ·") ;; " " " ·" " ⚫" or to hide: ?\s (without quotation marks)
(setq org-superstar-remove-leading-stars nil) ;; to remove the indentation, needs org-superstar-leading-bullet set to ?\s
(setq org-superstar-headline-bullets-list
;; ◆◇▲△▴▵★☆✦✧✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋
(cond
((find-font (font-spec :family "Symbols Nerd Font Mono"))
'(?󰓎 ?󰓒 ?󰫢 ?󰫣 ?󰫤 ?󰫥)) ;; '(?󰄯 ?󰄰 ?󰻂 ?󰻃 ?󰓏 ?󰦤 ? ?󰺕)
(t
'(?★ ?☆ ?✦ ?✧ ?▴ ?▵)) ))
;; '(?◉ ?○ ?✸ ?✿) 󰄯 󰄰 󰘻 󰘼 󰺕 󰬸 󰚕 󰻂 󰻃    󰓏 󰦤    󰐗 󰐙
;; 󰓎 󰓒 󰫢 󰫣 󰫤 󰫥
;; (setq org-superstar-leading-bullet ?\s)
@@ -654,10 +680,17 @@ Suggest the URL title as a description for resource."
(?- . ?)))
(setq org-superstar-special-todo-items t) ;; using symbols defined in org-superstar-todo-bullet-alist
(setq org-superstar-todo-bullet-alist ;; ☐ ☑ ☒
(cond
((find-font (font-spec :family "Symbols Nerd Font Mono"))
'(("TODO" ?󰀼 ?☐) ;;              󰀼 󱝋 󱝍 󱝏
("WAIT" . ?󱝏)
("DONE" . ?󱝍)
("CANC" . ?󱝋)))
(t
'(("TODO" . ?☐) ;;              󰀼 󱝋 󱝍 󱝏
("WAIT" . ?◷)
("DONE" . ?☑)
("CANC" . ?☒))) ))
(set-face-attribute 'org-superstar-leading nil :foreground "#42444a")) ;; "#42444a"

View File

@@ -51,9 +51,13 @@
;; ╚══╩══╝ └──┴──┘ ╰──┴──╯ ╰──┴──╯ ┗━━┻━━┛ └╌╌┘ ╎ ┗╍╍┛ ┋ ▁▂▃▄▅▆▇█
;; see M-x describe-char
(set-face-font 'default (font-spec :family "FiraCode Nerd Font" :size 13))
(cond
((find-font (font-spec :family "FiraCode Nerd Font"))
(set-face-font 'default (font-spec :family "FiraCode Nerd Font" :size 13)))
((find-font (font-spec :family "DejaVu Sans Mono"))
(set-frame-font (font-spec :family "DejaVu Sans Mono" :size 15))) )
;; (set-fontset-font FONTSET CHARACTERS FONT-SPEC &optional FRAME ADD)
;; (Set-fontset-font FONTSET CHARACTERS FONT-SPEC &optional FRAME ADD)
;; CHARACTERS see `script-representative-chars' and
;; list-character-sets and list-charset-chars for the list of
;; character sets and their characters.