0.96.1: Bad font rendering on HiDPI screens

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
stevenlele
Posts: 4
Joined: Sun May 03, 2020 8:01 am

0.96.1: Bad font rendering on HiDPI screens

Post by stevenlele »

XnView: MP 0.96.1 - 64-bit
OS: Windows 10 - 64-bit

Effect: Display glitch

On HiDPI screens, the font is rendered with artifacts on it.

To reproduce:
1. On a 4K screen with 200% scaling factor.
2. Use CJK languages, like Simplified Chinese, Traditional Chinese, or Japanese.

The same issue happened for qBittorrent, see this issue: https://github.com/qbittorrent/qBittorrent/issues/12295
This pull request may somehow be related to this issue: https://github.com/qbittorrent/qBittorrent/pull/12273
The developer also reported the bug to Qt: https://bugreports.qt.io/browse/QTBUG-83161

According to the issue post, there is a temporary workaround: to add an argument when opening the application.

Code: Select all

-platform windows:fontengine=freetype
It works on XnViewMP 0.96.1 according to my test. But this is not feasible because XnViewMP is started when we open an image file (so it's hard to start with an argument) instead of manually clicking the shortcut on the desktop.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.96.1: Bad font rendering on HiDPI screens

Post by xnview »

stevenlele wrote: Sun May 03, 2020 8:11 am It works on XnViewMP 0.96.1 according to my test. But this is not feasible because XnViewMP is started when we open an image file (so it's hard to start with an argument) instead of manually clicking the shortcut on the desktop.
you can change the xnview.sh script
Pierre.
stevenlele
Posts: 4
Joined: Sun May 03, 2020 8:01 am

Re: 0.96.1: Bad font rendering on HiDPI screens

Post by stevenlele »

xnview wrote: Sun May 03, 2020 2:36 pm
stevenlele wrote: Sun May 03, 2020 8:11 am It works on XnViewMP 0.96.1 according to my test. But this is not feasible because XnViewMP is started when we open an image file (so it's hard to start with an argument) instead of manually clicking the shortcut on the desktop.
you can change the xnview.sh script
The problem happens on Windows 10 system, so there is no .sh script.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.96.1: Bad font rendering on HiDPI screens

Post by xnview »

stevenlele wrote: Sun May 03, 2020 2:44 pm The problem happens on Windows 10 system, so there is no .sh script.
houps sorry, if you create a shortcut with parameters?
Pierre.
stevenlele
Posts: 4
Joined: Sun May 03, 2020 8:01 am

Re: 0.96.1: Bad font rendering on HiDPI screens

Post by stevenlele »

xnview wrote: Sun May 03, 2020 2:50 pm
stevenlele wrote: Sun May 03, 2020 2:44 pm The problem happens on Windows 10 system, so there is no .sh script.
houps sorry, if you create a shortcut with parameters?
As I said, I can apply this workaround when I double click the shortcut. However, XnViewMP is used to open images, which means when I double click an image to open it, this workaround will not work. It's also tedious to go into the registry and edit all the "Open with" handlers - one for each file format. Since qBittorrent has solved the same issue, I think it will not be hard to apply the same fix to XnViewMP.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.96.1: Bad font rendering on HiDPI screens

Post by xnview »

if you add in the qt.conf

Code: Select all

[Platforms] WindowsArguments = fontengine=freetype
Pierre.
stevenlele
Posts: 4
Joined: Sun May 03, 2020 8:01 am

Re: 0.96.1: Bad font rendering on HiDPI screens

Post by stevenlele »

xnview wrote: Mon May 04, 2020 8:01 am if you add in the qt.conf

Code: Select all

[Platforms] WindowsArguments = fontengine=freetype
Thank you, it works. That's a temporary workaround though. I hope you can fix the bug with the help of experience from qBittorrent developers.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.96.1: Bad font rendering on HiDPI screens

Post by xnview »

stevenlele wrote: Mon May 04, 2020 8:07 am
xnview wrote: Mon May 04, 2020 8:01 am if you add in the qt.conf

Code: Select all

[Platforms] WindowsArguments = fontengine=freetype
Thank you, it works. That's a temporary workaround though. I hope you can fix the bug with the help of experience from qBittorrent developers.
The patch in qTorrent seems to be for Qt 5.14 not Qt 5.12
Pierre.
Post Reply