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

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

    XMLWordPrintable

Details

    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

        1. 5.15.2_fontengine.txt
          3 kB
          Vladimir Belyavsky
        2. 6.2.2_fontengine.txt
          2 kB
          Vladimir Belyavsky
        3. image-2021-09-14-13-54-18-762.png
          114 kB
          Vladimir Belyavsky
        4. image-2021-12-15-20-00-37-841.png
          88 kB
          Vladimir Belyavsky
        5. image-2021-12-16-15-02-17-675.png
          12 kB
          Vladimir Belyavsky
        6. image-2021-12-16-15-03-15-998.png
          13 kB
          Vladimir Belyavsky

        Issue Links

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              studiosus Vladimir Belyavsky
              Votes:
              10 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: