Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109234

Scaling of fonts broken on Windows in certain cases

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.4.1
    • None
    • Windows

    Description

      I've noticed that scaling of fonts is broken on Windows in "certain cases". They are rendered too big - as if the normal UI scaling was applied and then some wrong additional scaling on top of that (see screenshot).

      Steps to reproduce:

      1. Set scaling in Window's settings to 300 %. I've been trying this under a recently updated version of Windows 10.
      2. Open a Qt application using Qt 6.4.1 (likely any Qt version that contains 45358c29d53242bf5ff401d06eebec53ffc6c4c8 will do).
      3. I'm not quite sure what the exact case is that triggers this bug. I could reproduce it with a Qt Widgets based application that has a tray icon and a context menu assigned to that tray icon. One simply needs to open the tray icon's context menu then. The UI is scaled as expected but the fonts are rendered too big (see screenshot).

      Workaround:

      The diff between Qt 6.4.0 was fortunately not very big when it comes to relevant changes. So I figured out that reverting 45358c29d53242bf5ff401d06eebec53ffc6c4c8 fixes the problem. By the way, I could also reproduce the problem this commit is trying to fix and I like that it is being tackled. Unfortunatley this regression makes things even worse.

      Further notes:

      Attachments

        1. fonts-too-big.png
          fonts-too-big.png
          340 kB
        2. fonts-too-big-2.png
          fonts-too-big-2.png
          217 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              martchus martchus
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes