Use black-on-white by default for doc-view-svg-face.
authorTassilo Horn <tsdh@gnu.org>
Mon, 23 Sep 2024 16:50:29 +0000 (18:50 +0200)
committerTassilo Horn <tsdh@gnu.org>
Tue, 24 Sep 2024 11:20:45 +0000 (13:20 +0200)
* lisp/doc-view.el (doc-view-svg-face): Define black on white as
default value instead of using the current theme's values.
* etc/NEWS: Adjust entry for doc-view-svg-face.

etc/NEWS
lisp/doc-view.el

index 8ed16cfeeff88c1dfab5edad38e486370b796d0c..c72a87787f36570dfce1a702741d9d4153a7f156 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1544,10 +1544,12 @@ default is non-nil if your system supports display of SVG images.
 ---
 *** New face 'doc-view-svg-face'.
 This replaces 'doc-view-svg-foreground' and 'doc-view-svg-background'.
-If you don't like the colors produced by the default definition of
-this new face when DocView displays documents, customize this face to
-restore the colors you were used to, or to get colors more to your
-liking.
+By default, this face has black foreground on white background and
+inherits from the default face.  When unsetting the foreground and
+background values, the display in DocView is styled according to the
+current theme.  However, this, or any non-standard values, can result in
+poor contrast for documents which aren't simply black text on white
+background.
 
 ---
 *** DocView buffers now display a new tool bar.
index 15352630d25af258139ed1c04d48cc924a934590..1ed0c71febe0d1c44bc1b10f316d91344f81b124 100644 (file)
@@ -238,10 +238,15 @@ showing only titles and no page number."
   :type 'boolean
   :version "29.1")
 
-(defface doc-view-svg-face '((t :inherit default))
+(defface doc-view-svg-face '((t :inherit default
+                                :background "white"
+                                :foreground "black"))
   "Face used for SVG images.
-Only background and foreground colors are used.
-See `doc-view-mupdf-use-svg'."
+See `doc-view-mupdf-use-svg'.
+
+Only background and foreground colors are used as the SVG image's
+descriptors, see (info \"(elisp) SVG Images\").  Non-standard values may
+cause low-contrast issues with certain documents."
   :version "30.1")
 
 (make-obsolete 'doc-view-svg-background 'doc-view-svg-face "30.1")