johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.18k stars 287 forks source link

"Light style" is white font on white page #1012

Closed Oberonc closed 9 months ago

Oberonc commented 1 year ago

In the GTK4 branch the only way to actually read the text is to use "Dark Style". "White Style" is basically a white colored font (you can see there is text there so it isn't a full white) on white page. "Follow system style" is the same as "White Style".

Is there a way to control the font / page colors ?

johnfactotum commented 1 year ago

You can use the inspector (F12) to inspect the CSS styles. Assuming this isn't some weird graphics problem, something is setting the color to white, and Foliate certainly isn't doing that right now.

Oberonc commented 1 year ago

I guess we can put that under "weird graphic problem". Under light style the observer itself is a fully white block as seen in the pictures I've attached.

Dark Style is fine: Screenshot from 2023-04-08 18-38-25

Same region of screen in "Light Style" (or "follow system style") .. not so much: Screenshot from 2023-04-08 18-38-46

johnfactotum commented 10 months ago

Does this still happen?

johnfactotum commented 10 months ago

Apparently it does, according to this comment

Nope. Intel igpu. I think it has to do with GTK4. The book is not blank, it's just always white on black even if I choose the light theme in the app. My desktop theme is dark, but you should be able to choose how your book is rendered independently of your desktop theme. The old Foliate app is much better in that respect.

http://disq.us/p/2wlp1x1

Edit: I think I read it wrong. The comment says it's always white on black, not white on white.

johnfactotum commented 10 months ago

If anyone can reproduce this, please try the following patch:

diff --git a/src/reader/reader.html b/src/reader/reader.html
index bd78314..51c5c51 100644
--- a/src/reader/reader.html
+++ b/src/reader/reader.html
@@ -1,6 +1,5 @@
 <!DOCTYPE html>
 <meta charset="utf-8">
-<meta name="color-scheme" content="light dark">
 <meta http-equiv="Content-Security-Policy" content="default-src 'self' blob:; script-src 'self'; style-src 'self' blob: 'unsafe-inline'; img-src 'self' blob: data:; connect-src 'self' blob: data:; frame-src blob: data:; object-src blob: data:; form-action 'none';">
 <style>
 html {
johnfactotum commented 9 months ago

Closing as works for me/stale for now. Feel free to comment if you're still having the same issue.