[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback)
From: |
Tassilo Horn |
Subject: |
Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback) |
Date: |
Mon, 23 Sep 2024 18:10:34 +0200 |
User-agent: |
mu4e 1.12.6; emacs 31.0.50 |
Eli Zaretskii <eliz@gnu.org> writes:
>> Only background and foreground colors are used.
>> -See `doc-view-mupdf-use-svg'."
>> +See `doc-view-mupdf-use-svg'.
>> +
>> +If foreground and background color are not specified explicitly and
>> +therefore inherit from the `default' face, the default
>> +foreground/background color values are passed to `create-image' when
>> +preparing the SVG for display in the doc-view buffer. The effect is
>> +that the current theme's foreground/background values are applied to the
>> +SVG display. Note that this doesn't work for documents which are not
>> +simply black-on-white where it can lead to unreadable documents due to
>> +foreground and background color being equal or similar."
>> :version "30.1")
>
> I think this is too technical, and describes what the face definitions
> do. I think we only need to say there that if the face's colors cause
> color SVG images display with low contrast between foreground and
> background, the user should customize the face to produce a better
> contrast.
Indeed.
> Also, I thought we agreed to also have some text in NEWS to delineate
> this issue.
Right. So next try, including a change of the NEWS entry for the face:
--8<---------------cut here---------------start------------->8---
diff --git a/etc/NEWS b/etc/NEWS
index 8ed16cfeeff..c72a87787f3 100644
--- 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.
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 15352630d25..1ed0c71febe 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -238,10 +238,15 @@ doc-view-imenu-flatten
: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")
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), (continued)
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Tassilo Horn, 2024/09/21
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Morgan Willcock, 2024/09/22
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Tassilo Horn, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Manuel Giraud, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Tassilo Horn, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Manuel Giraud, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Eli Zaretskii, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Tassilo Horn, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Eli Zaretskii, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Morgan Willcock, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback),
Tassilo Horn <=
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Eli Zaretskii, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Tassilo Horn, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Eli Zaretskii, 2024/09/24
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Tassilo Horn, 2024/09/24
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Manuel Giraud, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Tassilo Horn, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Manuel Giraud, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Visuwesh, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Eli Zaretskii, 2024/09/23
- Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback), Tassilo Horn, 2024/09/23