PacketSender icon indicating copy to clipboard operation
PacketSender copied to clipboard

Tiny fonts

Open sirxyzzy opened this issue 5 years ago • 6 comments

What OS?

  • [ ] Windows

Description of issue

Font size seems really small, see screenshot, I suspect this is because I am using a high DPI device (Surface Laptop 2) 2256x1504

packetsender-fonts

Most native apps work well, but I have seen this sort of thing before from Qt based apps. I couldn't find a way to adjust font sizes manually

As a reference, here is a screenshot of the default font size in notepad, on the same screen.

notepad-fonts

sirxyzzy avatar Mar 07 '20 20:03 sirxyzzy

I unfortunately do not own a Windows laptop with a retina display to test on.

I know Qt has put effort in to this. It took them a while to look decent on retina Macbooks, but they did eventually get there. Perhaps their latest Windows kit has made progress. If I made a portable alpha with it, will you give it a quick launch on your laptop?

dannagle avatar Mar 08 '20 01:03 dannagle

Sure, I would be happy to test it out. FWIW, I see similar behavior in QtBittorrent, it seems to afflict custom text, but standard widgets (somehow) scale text better.

There is some interesting discussion here, https://doc.qt.io/qt-5/highdpi.html

I may be able to do a local build and fiddle with things a bit myself, depending on how difficult it is to build on Windows

sirxyzzy avatar Mar 08 '20 19:03 sirxyzzy

Here is an alpha of my standard build using updated Qt libraries: https://github.com/dannagle/PacketSender/releases/tag/v6.3.0-alpha

dannagle avatar Mar 10 '20 01:03 dannagle

Looks the same as before, here is a screenshot...

packetsenderalpha

Let's see if I can build, then I can fiddle around...

sirxyzzy avatar Mar 10 '20 02:03 sirxyzzy

I was able to build, but I don't really know Qt, but as I have never used Qt before I'm not making headway (and Qt is a monster) I tried something as simple as editing a UI file in an attempt to explicitly set a font and I got precisely nowhere. I tried setting some promising looking env vars:

QT_AUTO_SCREEN_SCALE_FACTOR 1 QT_ENABLE_HIGHDPI_SCALING 1

No joy there either.

Amusingly the Qt installer itself has the exact same "miniature font" behavior.

Hey, I tried!

sirxyzzy avatar Mar 10 '20 04:03 sirxyzzy

Qt does a mix of its own widget rendering and native rendering. Something got lost in translation. If the Qt installer itself does it, the bug may be baked pretty deep and outside my control. I'll probably have to wait for them to fix. I appreciate your effort!

dannagle avatar Mar 10 '20 12:03 dannagle

This issue is basically the same problem mentioned here: #297 . Closing this one (yes, I know this one was opened first). Some fixes have been put place. More is needed.

dannagle avatar Mar 05 '23 02:03 dannagle