Skip to content

Commit

Permalink
fix: add more faces
Browse files Browse the repository at this point in the history
Add a couple more faces needed for HTML export in ox-chameleon
  • Loading branch information
elken committed May 30, 2022
1 parent fe29d9b commit 462bba3
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions engrave-faces.el
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
:group 'hypermedia)

(defcustom engrave-faces-attributes-of-interest
'(:foreground :background :slant :weight :height :strike-through)
'(:family :foreground :background :slant :weight :height :strike-through)
"Attributes which sould be paid attention to."
:group 'engrave-faces
:type '(repeat symbol))
Expand Down Expand Up @@ -263,11 +263,15 @@ This function is lifted from htmlize."
(defcustom engrave-faces-themes
'((default .
(;; faces.el --- excluding: bold, italic, bold-italic, underline, and some others
(default :short "default" :slug "D" :foreground "#000000" :background "#ffffff")
(default :short "default" :slug "D" :foreground "#000000" :background "#ffffff" :family "Monospace")
(variable-pitch :short "var-pitch" :slug "vp" :foreground "#000000" :family "Sans Serif")
(shadow :short "shadow" :slug "h" :foreground "#7f7f7f")
(success :short "success" :slug "sc" :foreground "#228b22" :weight bold)
(warning :short "warning" :slug "w" :foreground "#ff8e00" :weight bold)
(error :short "error" :slug "e" :foreground "#ff0000" :weight bold)
(link :short "link" :slug "l" :foreground "#ff0000")
(link-visited :short "link" :slug "lv" :foreground "#ff0000")
(highlight :short "link" :slug "hi" :foreground "#ff0000")
;; font-lock.el
(font-lock-comment-face :short "fl-comment" :slug "c" :foreground "#b22222")
(font-lock-comment-delimiter-face :short "fl-comment-delim" :slug "cd" :foreground "#b22222")
Expand All @@ -287,6 +291,15 @@ This function is lifted from htmlize."
(font-lock-regexp-grouping-backslash :short "fl-regexp-backslash" :slug "rb" :weight bold)
;; org-faces.el
(org-block :short "org-block" :slug "ob") ; forcing no background is preferable
;; outlines
(outline-1 :foreground blue :short "o-1")
(outline-2 :foreground magenta :short "o-2")
(outline-3 :foreground violet :short "o-3")
(outline-4 :foreground (doom-lighten blue 0.25) :short "o-4")
(outline-5 :foreground (doom-lighten magenta 0.25) :short "o-5")
(outline-6 :foreground (doom-lighten blue 0.5) :short "o-6")
(outline-7 :foreground (doom-lighten magenta 0.5) :short "o-7")
(outline-8 :foreground (doom-lighten blue 0.8) :short "o-8")
;; highlight-numbers.el
(highlight-numbers-number :short "hl-number" :slug "hn" :foreground "#008b8b")
;; highlight-quoted.el
Expand Down Expand Up @@ -382,8 +395,8 @@ Unconditionally returns nil when FACES is default."
(delq nil
(mapcar
(lambda (attr)
(let ((attr-val (when (facep (car face-style))
(face-attribute (car face-style) attr nil t))))
(when-let ((attr-val (when (facep (car face-style))
(face-attribute (car face-style) attr nil t))))
(when (or (engrave-faces--check-nondefault attr attr-val)
(and (eq (car face-style) 'default)
(not (memq attr '(:height :strike-through)))))
Expand Down

0 comments on commit 462bba3

Please sign in to comment.