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: Morgan Willcock
Subject: Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback)
Date: Sat, 21 Sep 2024 10:27:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Tassilo Horn <tsdh@gnu.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> When testing the Emacs 30 pre-release I found that all of the PDF
>>> files which I tried to view were not readable because the text
>>> appeared to be missing.
>>>
>>> Eventually I found the variable doc-view-mupdf-use-svg, and setting
>>> it to nil reverted the rendering to the old method where the text was
>>> visible.
>>
>> Why is that?  If your system supports display of SVG images, why
>> wasn't the text readable?  Tassilo, any ideas?
>
> I suspect it's some sort of background-equals-foreground issue.  I think
> by default, the SVGs have transparent background.  So when you use a
> dark theme (I tested with the built-in modus-vivendi theme which is very
> dark), you might get black foreground on black background.

I use modus-vivendi and sometimes toggle it to modus-operandi to use the
light version.  It does seem to be the currently active theme which
makes the text invisible, with the dark theme making the text
unreadable.

If I load no theme then the documents are rendered normally (as far as I
can tell).

> Visuwesh already cited the cure: in emacs 29 you might want to set
> doc-view-svg-foreground/background to white/black or vice versa (and
> then re-convert your PDF).

If I use image-save to save a copy of the SVG file, the conversion
always appears to be usable and a good representation of the original
document, even when what is displayed in the buffer is not.

Toggling the theme between the light and dark theme while viewing the
image in the buffer toggles it between readable and unreadable.

> In emacs 30, that has been replaced with the face doc-view-svg-face
> where you can customize foreground and background such that the contrast
> works for you and your theme.
>
> Hm, but doc-view-svg-face inherits from the default face and that is
> white-on-black with modus-vivendi, so actually it should all be good,
> i.e., the PDF display should match your theme.  However, depending on
> PDF I tested, I sometimes get white-on-black display (good!) and
> sometimes darkish-on-black (bad!).

Is there any way to opt-out from the theme having any effect on how the
result is presented while still giving a usable result?

> It seems like it works as intended for "standard black-on-white PDFs"
> but doesn't really work when the PDF is "fancy", e.g., gray foreground
> or colorized borders or what not...

This does describe the documents I am testing with.  They all have some
kind of coloured border.  Azure invoices use a light gray foreground
colour with black text on it, while also using a darker gray background
with white text on it.

-- 
Morgan Willcock



reply via email to

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