Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggling Scroll Mode changes font weight unexpectedly #1404

Open
guile-rc opened this issue Oct 5, 2024 · 6 comments
Open

Toggling Scroll Mode changes font weight unexpectedly #1404

guile-rc opened this issue Oct 5, 2024 · 6 comments
Labels
bug Something isn't working not our bug Needs to be fixed upstream or elsewhere

Comments

@guile-rc
Copy link

guile-rc commented Oct 5, 2024

Describe the bug
When toggling Scroll Mode in Foliate, the font weight of the text changes unexpectedly.

To Reproduce
Steps to reproduce the behavior:

  1. Open any book in Foliate.
  2. Toggle the Scroll Mode on and off.

Expected behavior
The font weight should remain consistent across both modes (normal and scroll).

Screenshots
Captura de tela de 2024-10-04 22-38-11
Captura de tela de 2024-10-04 22-38-26

Version:

  • Foliate version: 3.1.1
  • OS/Distribution and version: Fedora 40
  • Desktop environment: GNOME 46
  • Installation method: Flatpak

Additional context
The system font is configured without hinting and utilizes subpixel smoothing.

@guile-rc guile-rc added the bug Something isn't working label Oct 5, 2024
@johnfactotum
Copy link
Owner

The text does actually look bolded to me, rather than being some sort of rendering difference. I would say there's a media query in the book's stylesheet that changes the font weight. But that also seems unlikely.

Does it happen wit every book and every font? Does it happen in the online demo reader, https://johnfactotum.github.io/foliate-js/reader.html, in Firefox or Chrome?

@johnfactotum johnfactotum changed the title Text rendering issues Toggling Scroll Mode changes font weight unexpectedly Oct 5, 2024
@guile-rc
Copy link
Author

guile-rc commented Oct 6, 2024

In the app, it happens with every book, whether it’s from Amazon, Standard Ebooks or made by me. However, the issue doesn’t appear in the online demo reader.

@johnfactotum
Copy link
Owner

This is very peculiar. Does it happen if you use the online reader in Epiphany? And what font are you using? Have you tried using the inspector to see if there are extra styles applied in different modes?

@guile-rc
Copy link
Author

guile-rc commented Oct 6, 2024

The problem does occur in Epiphany. The font-weight property in the browser remains set to 400, however. I'm using Crimson Pro, but it happens with every font I've tested.

@johnfactotum
Copy link
Owner

Well, it must be a WebKitGTK bug, then.

Recently they replaced Cairo with Skia, which has resulted in some bugs related to font rendering. See https://blogs.igalia.com/carlosgc/2024/09/27/graphics-improvements-in-webkitgtk-and-wpewebkit-2-46/. If you're using WebKitGTK 2.46, that must be related to this.

I suppose you can try reporting this at https://bugs.webkit.org. Though it would be better if one can create a minimal example. It's probably either very wide multicolumn text (paginated mode) or very tall iframe (scrolled mode) that triggers the abnormal rendering. If it's the former, you would see bold text on most webpages. And it's probably something dependent on the hardware setup as well; at least I'm unable to reproduce this.

@johnfactotum johnfactotum added the not our bug Needs to be fixed upstream or elsewhere label Oct 7, 2024
@guile-rc
Copy link
Author

Made a bug report: https://bugs.webkit.org/show_bug.cgi?id=281824

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not our bug Needs to be fixed upstream or elsewhere
Projects
None yet
Development

No branches or pull requests

2 participants