qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Windows: Monospace font in UI after latest update

Open gr3ger opened this issue 6 months ago • 45 comments
trafficstars

qBittorrent & operating system versions

qBittorrent: 5.1.0 (x64) os: Windows 11 24H2, stable

What is the problem?

After updating from 5.0.5 to the latest version (5.1.0), all the text in the UI is rendered using a monospace font and as far as I know there's no way to customize this. I tried both with and without custom themes, does not seem to be the problem. There's no errors in the logs other than the usual SSL error for favicons and UPNP failure.

Steps to reproduce

Just install the latest update and start it up.

Additional context

Edit: supplying -platform windows:fontengine=gdi as a launch argument the issue gets resolved.

Log(s) & preferences file(s)

Image

gr3ger avatar Apr 28 '25 11:04 gr3ger

custom themes

If it's not a custom theme, it's a Windows font.

stalkerok avatar Apr 28 '25 12:04 stalkerok

Should've included preferences file to see what outdated Qt related things are causing issues or at least a screenshot of Behavior instead of Downloads page to know what UI settings such as Qt Style you're using.

Maybe using different Qt Style (Behavior page) in qBit or resetting settings will fix your issue.

If want to try default settings, then just exit qBit, delete configuration qBittorrent.ini file and reopen qBit.

https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#user-content-How_can_I_reset_the_settings_to_default_values

Windows 11 24H2.

Latest stable or unstable version?

Monospace font in UI.

Are you certain you didn't modify Windows Font?

After updating the the latest version.

What version did you have before?

If you don't remember, then look at log files.

https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#user-content-Where_does_qBittorrent_save_its_settings

qBittUser avatar Apr 28 '25 12:04 qBittUser

Qt have changed font engine on windows to use directwrite by default as of 6.8.x

https://www.qt.io/blog/qt-6.8-released

xavier2k6 avatar Apr 28 '25 12:04 xavier2k6

Official qBittorrent v5.1 looks good for me on Windows 11 24H2.

glassez avatar Apr 28 '25 12:04 glassez

custom themes

If it's not a custom theme, it's a Windows font.

I was merely ruling out that using a custom theme in qbit was not the cause, and as far as I know no fonts has been touched. It's only qBittorrent that is misbehaving

If want to try default settings, then just exit qBit, delete configuration qBittorrent.ini file and reopen qBit.

Deleted qBittorrent.ini from %APPDATA%\qBittorrent, same issue.

Latest stable or unstable version?

Stable, updated original post.

Are you certain you didn't modify Windows Font?

Yes

What version did you have before?

5.0.5, updated original post

gr3ger avatar Apr 28 '25 12:04 gr3ger

Same issue here with the broken font. I had set an OS-wide global font using Winaero, and qBittorrent was obeying it until v5.1.0 broke the change. Only that in my case, it's not a monospace font that it's using. Every other non-OS native application on my machine adheres to the font set globally.

jay-ramani avatar Apr 28 '25 13:04 jay-ramani

@jay-ramani

What if you try using a different Qt Style in qBit Behavior?

qBittUser avatar Apr 28 '25 13:04 qBittUser

@jay-ramani

What if you try using a different Qt Style in qBit Behavior?

Thanks for the snappy response. I'm using the Mumble Dark theme, but even if I disable the custom theme, the font still remains broken. Also, tried various options in the Style dropdown, but didn't help.

jay-ramani avatar Apr 28 '25 13:04 jay-ramani

@gr3ger are you also using Winaero or some other Windows OS Tweaker?

Can you also confirm that changing qBit Qt style and then restarting qBit doesn't affect qBit font?

qBittUser avatar Apr 28 '25 14:04 qBittUser

@gr3ger are you also using Winaero or some other Windows OS Tweaker?

Can you also confirm that changing qBit Qt style and then restarting qBit doesn't affect qBit font?

No, I'm not using Winaero or any other tweaks. It is a fairly old installation though, so maybe something I'm not aware of has been changed a long time ago. And I tried all different styles, both with and without themes, and fonts stayed the same (a monospace font).

I'll see if I can build from source later and debug exactly why it happens. Can you point me as to where it gets/sets the app font? I'm not super familiar with QT in general.

gr3ger avatar Apr 28 '25 15:04 gr3ger

@gr3ger are you also using Winaero or some other Windows OS Tweaker? Can you also confirm that changing qBit Qt style and then restarting qBit doesn't affect qBit font?

No, I'm not using Winaero or any other tweaks. It is a fairly old installation though, so maybe something I'm not aware of has been changed a long time ago. And I tried all different styles, both with and without themes, and fonts stayed the same (a monospace font).

I'll see if I can build from source later and debug exactly why it happens. Can you point me as to where it gets/sets the app font? I'm not super familiar with QT in general.

@qBittUser, @gr3ger, do you folks need any logs or anything else with experimental builds? I'm happy to assisting in fixing the issue. Well, as long as my existing torrents are not disrupted. Lol! I know installations don't disturb them, but just a caution.

Cheers.

jay-ramani avatar Apr 28 '25 20:04 jay-ramani

do you folks need any logs or anything else with experimental builds?

Should've asked active contributors and qBit team members.

I doubt current experimental builds and qBit logs will ever show anything informative.

Someone needs to figure out how to reproduce your issue, then maybe more knowledgeable Qt users can suggest qBit workarounds, more detailed explanation and maybe only then they will decide if they can help to submit a proper bug report to Qt developers if uncertain if it's a new Qt 6.9.0 related intended behavior, a real regression and then share if any fix is planned to be added into in a newer Qt or qBit version.

I know installations don't disturb them, but just a caution.

They can cause unexpected issues, after installing and then running. Even if you believe you have reliable drives, computer and if never noticed any failures or data loss, you still should always have backups.

It's also unnecessary to try luck with various qBit modifications if you can just keep a copy of qBit in different location and run qBit in portable mode, especially if just wish to test if font issue is reproducible with older, newer qBit version, nightly builds or any other forked qBit build that's made with a different Qt version.

Link to latest experimental nightly builds is mentioned in official download page, afterwards select to download *.zip file artifact, extract it and add a New Folder where's the qBittorrent.exe and rename the New Folder to be Profile before running qBit.

Portable mode is also mentioned in Wiki: https://github.com/qbittorrent/qBittorrent/wiki/How-to-use-portable-mode

qBittUser avatar Apr 28 '25 22:04 qBittUser

Here is how you fix it:

Add this to the shortcut:

-platform windows:fontengine=gdi

ionGL avatar Apr 29 '25 00:04 ionGL

Here is how you fix it:

Add this to the shortcut:

-platform windows:fontengine=gdi

Worked like a charm! Holy cow!

Many thanks.

jay-ramani avatar Apr 29 '25 02:04 jay-ramani

I created a feature request to include convenient qBit UI built-in Qt's Font rendering options (GDI, DirectWrite):

  • https://github.com/qbittorrent/qBittorrent/issues/22633

qBittUser avatar Apr 29 '25 08:04 qBittUser

How does -platform windows:fontengine=freetype behave?

xavier2k6 avatar Apr 29 '25 09:04 xavier2k6

Is ClearType enabled/disabled in Windows settings?

xavier2k6 avatar Apr 29 '25 09:04 xavier2k6

Is ClearType enabled/disabled in Windows settings?

I have it enabled in windows.

gr3ger avatar Apr 29 '25 10:04 gr3ger

Fixed a typo & added Qt 6.8 blog link in https://github.com/qbittorrent/qBittorrent/issues/22622#issuecomment-2835102632

xavier2k6 avatar Apr 29 '25 17:04 xavier2k6

Related #22073

xavier2k6 avatar Apr 29 '25 18:04 xavier2k6

How does -platform windows:fontengine=freetype behave?

I have font smoothing enabled, and compared to fontengine=gdi, fontengine=freetype does not do as good a job with character spacing

Image

Image

jay-ramani avatar Apr 30 '25 20:04 jay-ramani

I have the same problem, and i do use winaero tweaker, not sure exactly what i might have changed. it did get fixed with the "-platform windows:fontengine=gdi" switch though.

giann3 avatar May 01 '25 07:05 giann3

How does -platform windows:fontengine=freetype behave?

IIRC, freetype is default since Qt 6.8.

glassez avatar May 01 '25 08:05 glassez

How does -platform windows:fontengine=freetype behave?

IIRC, freetype is default since Qt 6.8.

It was default up to Qt 6.8 -> https://github.com/qbittorrent/qBittorrent/issues/22622#issuecomment-2835102632

We probably would've come across this issue sooner if there was more public testing of CI builds/a release build with Qt 6.8.x

xavier2k6 avatar May 01 '25 09:05 xavier2k6

IIRC, freetype is default since Qt 6.8.

It was default up to Qt 6.8 -> #22622 (comment)

Got it. I was confused by the fact that the current documentation mentions only two fontengine parameter values, gdi and freetype.

We probably would've come across this issue sooner if there was more public testing of CI builds/a release build with Qt 6.8.x

Maybe you're right. There would be more chances, but how much? I doubt that many people use CI builds.

glassez avatar May 01 '25 11:05 glassez

Now I believe that since the fontengine change was not made intentionally by qBittorrent project, we could simply return the previous one (via shipped qt.conf file), provided that it has fewer disadvantages in our use case. @sledgehammer999, @Chocobo1, @qbittorrent/bug-handlers, what do you think?

glassez avatar May 01 '25 11:05 glassez

No strong opinion, I think the accent color issue is more important.

xavier2k6 avatar May 01 '25 11:05 xavier2k6

Bad idea. Now dark and light mode have the same behavior when changing the accent color. Those who really need to override the behavior can modify qt.conf themselves.

stalkerok avatar May 01 '25 11:05 stalkerok

A better idea would be to add a switch in the interface https://github.com/qbittorrent/qBittorrent/issues/22633

stalkerok avatar May 01 '25 12:05 stalkerok

maybe the issue only occurs due to certain fonts being used by the user/locale as not everyone's affected....could be an outdated driver?!

xavier2k6 avatar May 01 '25 12:05 xavier2k6