Sigil-Ebook / Sigil

Sigil is a multi-platform EPUB ebook editor
GNU General Public License v3.0
5.71k stars 570 forks source link

[Bug]: font appears blurry in wayland environment preview #752

Closed douglarek closed 2 months ago

douglarek commented 2 months ago

Bug Description

In wayland environment, the font appears very blurry when previewing the page. there is no issue in the X11 environment.

image

test file: sjsjz.tar.gz

Platform (OS)

Linux

OS Version / Specifics

Manjaro/KDE 6.0.4

What version of Sigil are you using?

2.1.0

Any backtraces or crash reports

No response

kevinhendricks commented 2 months ago

We changed nothing font related that would cause fuzziness. Perhaps a Qt version issue? Or a Wayland issue? Bad Anti-aliasing issue?

Use Sigil's About menu to see which Qt Version you are using and report it here.

I will run your test case on macOS and my Manjaro KDE X11 box to see what it shows?

dougmassay commented 2 months ago

I'm not seeing anything particularly blurry in the screenshot. But then I don't know how that font appears outside of Sigil's Preview. I also have no machines with distros that support Wayland to test on.

On Wed, Apr 17, 2024, 12:26 PM Kevin Hendricks @.***> wrote:

We changed nothing font related that would cause fuzziness. Perhaps a Qt version issue? Or a Wayland issue? Bad Anti-aliasing issue?

Use Sigil's About menu to see which Qt Version you are using and report it here.

I will run your test case on macOS and my Manjaro KDE X11 box to see what it shows?

— Reply to this email directly, view it on GitHub https://github.com/Sigil-Ebook/Sigil/issues/752#issuecomment-2061709812, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACG3CXQLYEWFBSI7MNJBO6LY52PCLAVCNFSM6AAAAABGLSLW3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRRG4YDSOBRGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

kevinhendricks commented 2 months ago

It looks just fine on macOS and on Manjaro Linux KDE X11. I stay far away from wayland so I have nothing that will work using it.

My guess is it is one of the hundreds of wayland bugs dealing with either fonts or fractional scaling that have ben reported over the last couple of years. It could also be a Qt bug but I searched Qt's All Issues with wayland and nothing obvious jumped out.

I am sorry but we have no way to recreate what you are seeing. Can you try running Sigil within XWayland and see if the problem persists? Alternatively change your display to not use fractional scaling (use 100% or 200% not say 125%) and see if the problem persists.

There is no code inside the Sigil project itself that can cause this issue. Preview is simply a QtWebEngineView widget.

It does not appear to be an embedded font issue unless it is an interaction of font and fontengine. Again neither of which Sigil controls.

douglarek commented 2 months ago

I am sorry but we have no way to recreate what you are seeing. Can you try running Sigil within XWayland and see if the problem persists? Alternatively change your display to not use fractional scaling (use 100% or 200% not say 125%) and see if the problem persists.

Thank you very much for testing Manjaro X11. As mentioned in my issue, X11 indeed doesn't have any problems. Following your suggestion, I adjusted the scaling within Wayland to 200% in the system display settings, and the issue indeed disappeared. So it can be confirmed that this is due to the scaling setting of my system (currently at 150%). Currently, it's not just Sigil that has issues; Sigil's BB Reader plugin, as well as Calibre's EPUB viewer, also have problems. I wonder if they are using the same components.

I'm not an expert in Wayland either, so it seems all I can do is wait. Nevertheless, thank you very much regardless.

dougmassay commented 2 months ago

They all use Qt's implementation of Google's WebEngine to render (x)html.

On Wed, Apr 17, 2024, 11:30 PM douglarek @.***> wrote:

I am sorry but we have no way to recreate what you are seeing. Can you try running Sigil within XWayland and see if the problem persists? Alternatively change your display to not use fractional scaling (use 100% or 200% not say 125%) and see if the problem persists.

Thank you very much for testing Manjaro X11. As mentioned in my issue, X11 indeed doesn't have any problems. Following your suggestion, I adjusted the scaling within Wayland to 200% in the system display settings, and the issue indeed disappeared. So it can be confirmed that this is due to the scaling setting of my system (currently at 150%). Currently, it's not just Sigil that has issues; Sigil's BB Reader plugin, as well as Calibre's EPUB viewer, also have problems. I wonder if they are using the same components.

— Reply to this email directly, view it on GitHub https://github.com/Sigil-Ebook/Sigil/issues/752#issuecomment-2062926772, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACG3CXTEQUK2HKWRZE2BEQ3Y5446VAVCNFSM6AAAAABGLSLW3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRSHEZDMNZXGI . You are receiving this because you commented.Message ID: @.***>

kevinhendricks commented 2 months ago

I am going to close this as the bug is not in Sigil code but instead in wayland or Qt. So I would strongly recommend making a bug report with Qt if you want to get anything fixed. They will ask for a sample program to illustrate the bug. I have one I used for earlier Qt font bugs that could be easily modified to load your font in QWebEngineView (the widget we use for Preview). I can post it here for you if you want.

Just let me know.