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

Text: Inaccurate font opacity

XMLWordPrintable

      In recent versions of Qt, I found that the font opacity rendering in Text component is incorrect. The transparency blending results in Qt 5.13 are more in line with expectations, both in appearance and numerically.

      Here's the code I use to demonstrate this issue:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          width: 256
          height: 256
          visible: true
          color: "black"
          title: qsTr("Font Opacity Test")
      
          Row {
              anchors.centerIn: parent
      
              spacing: 16
      
              Text {
                  id: bigText
                  font.family: "Arial"
                  font.pixelSize: 64
                  text: "BIG"
                  color: "#CCFFFFFF"
                  // disable subpixel antialiasing
                  style: Text.Outline
                  styleColor: "transparent"
              }
      
              Text {
                  id: smallText
                  anchors.baseline: bigText.baseline
                  font.family: "Arial"
                  font.pixelSize: 16
                  text: "Small"
                  color: "#CCFFFFFF"
                  // disable subpixel antialiasing
                  style: Text.Outline
                  styleColor: "transparent"
              }
          }
      }
      

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

            esabraha Eskil Abrahamsen Blomfeldt
            gpbeta Joshua GPBeta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes