branch: elpa/org-superstar commit c70360d76bf3be54ae2c286a482bcfdd7d5fd309 Author: D. Williams <d.willi...@posteo.net> Commit: D. Williams <d.willi...@posteo.net>
Adding "test image" face-test.el --- tests/README.org | 6 +++++ tests/face-test.el | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) diff --git a/tests/README.org b/tests/README.org index b07432b5ba..d5e24a60b3 100644 --- a/tests/README.org +++ b/tests/README.org @@ -33,5 +33,11 @@ return proper faces (or ~nil~). This module auto-enables ~column-number-mode~ as well as ~linum-mode~ for org to allow for manual, character-wise comparison of the characters prettified. +** =face-test.el= +This file sets all faces to strongly contrasting colors and adds many +different face properties to see if and how they work. It essentially +serves as a test image for quick visual confirmation that all faces +are applied consistently. + # LocalWords: README el diff --git a/tests/face-test.el b/tests/face-test.el new file mode 100644 index 0000000000..370f94c1bb --- /dev/null +++ b/tests/face-test.el @@ -0,0 +1,73 @@ +;;; face-test.el --- Visualize how org-superstar faces modify the buffer. -*- lexical-binding: t; -*- + +;;; Commentary: + +;;; This file creates a simple "test image" of a buffer to help +;;; visualize the effects and limitations of common face attributes. + +;;; Code: + + + +(setq org-superstar-item-bullet-alist + '((?* . ?⌬) + (?+ . ?◐) + (?- . ?⏭))) + +(setq org-superstar-leading-bullet ?⁂) + +;; Mess with character heights (nicked from LaTeX) + +(set-face-attribute + 'default nil + :height 150) + +(set-face-attribute + 'org-document-title nil + :height 2.074 ;; \huge + :foreground 'unspecified + :inherit 'org-level-8) + + +(set-face-attribute + 'org-level-1 nil + :height 1.728) ;; \LARGE + +(set-face-attribute + 'org-level-2 nil + :height 1.44) ;; \Large + +(set-face-attribute + 'org-level-3 nil + :height 1.2) ;; \large + +(set-face-attribute + 'org-level-4 nil + :height 1.0 + :foreground "red") + +;; Only use the first 4 styles and do not cycle. +(setq org-cycle-level-faces nil) +(setq org-n-level-faces 4) + +(set-face-attribute + 'org-superstar-leading nil + :height 1.2 + :weight 'light + :slant 'italic + :inverse-video t + :box '(:line-width 2 :color "magenta") + :inherit 'unspecified) + +(set-face-attribute + 'org-superstar-header-bullet nil + :height 1.2 + :background "cyan" + :weight 'ultra-bold) + +(set-face-attribute + 'org-superstar-item nil + :foreground "lawn green" + :background "magenta" + :box t + :height 1.2)