emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-superstar c70360d76b 028/162: Adding "test image" face


From: Stefan Kangas
Subject: [nongnu] elpa/org-superstar c70360d76b 028/162: Adding "test image" face-test.el
Date: Fri, 31 Dec 2021 19:35:21 -0500 (EST)

branch: elpa/org-superstar
commit c70360d76bf3be54ae2c286a482bcfdd7d5fd309
Author: D. Williams <d.williams@posteo.net>
Commit: D. Williams <d.williams@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]