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

The font underline is partially missing when using the Segoe UI font with the OpenGL backend.

XMLWordPrintable

    • All

      When using the OpenGL backend in Qt 6.8.4, underlines drawn with the Segoe UI font are sometimes clipped or not fully displayed. This issue does not occur in Qt 6.5.10.

      The issue seems related to a combination of screen scaling and font size. At certain scale factors, specific font sizes cause the underline to be partially missing or incorrectly rendered.

      Steps to reproduce:

      1. Build and run the attached example project.
      1. Observe, the underline of the text is not fully displayed.

      Workaround:
      Modifying the implicit width/height calculation in QML controls helps mitigate the issue.

      Original code: 

      implicitWidth: Math.max(Math.max(implicitBackgroundWidth + leftInset + rightInset,
      implicitContentWidth + leftPadding + rightPadding), minWidth())
      implicitHeight: Math.max(Math.max(implicitBackgroundHeight + topInset + bottomInset,
      implicitContentHeight + topPadding + bottomPadding), minHeight())

       

      Modified workaround:

      implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
      implicitContentWidth + leftPadding + rightPadding)
      implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
      implicitContentHeight + topPadding + bottomPadding) 

       

        1. QTBUG-140103.zip
          4 kB
          Chakib Boutaghane
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            esabraha Eskil Abrahamsen Blomfeldt
            chakib Chakib Boutaghane
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes