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

Text's underline thickness is unstable on fractional screen's scale factors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2, 6.2.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 10, MSVC 2019

      Description

      Text's underline thickness is unstable on fractional screen's scale factors.
      Reproduced at least on 125% screen's scale factor.

      import QtQuick 2
      import QtQuick.Window 2
      
      Window {
          width: 640
          height: 480
          visible: true
      
          ListView {
              anchors.fill: parent
              model: 100
              delegate: Text {
                  text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s..."
                  font.pixelSize: 16 // not reproduced on 12, 15, 18, 21, etc
                  font.underline: true
                  renderType: Text.NativeRendering // reproduced on Text.QtRendering as well
              }
          }
      }
      

      Pay attention that to reproduce this on Qt 5 you need call

      QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
      QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
      

      before creation of the application object

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              esabraha Eskil Abrahamsen Blomfeldt
              Reporter:
              studiosus Vladimir Belyavsky
              Votes:
              9 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes