emacs-devel
[Top][All Lists]
Advanced

[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: Eli Zaretskii
Subject: Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback)
Date: Mon, 23 Sep 2024 18:35:28 +0300

> From: Tassilo Horn <tsdh@gnu.org>
> Cc: Manuel Giraud <manuel@ledu-giraud.fr>,  morgan@ice9.digital,
>   emacs-devel@gnu.org,  visuweshm@gmail.com
> Date: Mon, 23 Sep 2024 16:51:28 +0200
> 
> > Should we perhaps define suitable settings for this face in the themes
> > that come with Emacs?
> 
> I think the problem is much more likely when using a dark theme, so
> those could define black foreground and white background for
> doc-view-svg-face.  But since there are so many popular dark themes
> outside of emacs, I doubt that's a good idea.

OK.

> In the end, if the theming of the PDF/SVG gives suitable results depends
> on the PDF and we have no way to test if it does for the one at hand.
> So I'd rather apply something like that to the emacs-30 branch:
> 
> --8<---------------cut here---------------start------------->8---
> diff --git a/lisp/doc-view.el b/lisp/doc-view.el
> index 15352630d25..667b0e12986 100644
> --- a/lisp/doc-view.el
> +++ b/lisp/doc-view.el
> @@ -238,10 +238,21 @@ 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.

This part is okay.

>  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.

Also, I thought we agreed to also have some text in NEWS to delineate
this issue.

Thanks.



reply via email to

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