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

Mac - Strikeout bugged in QML TextEdit for Japanese

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.2.0
    • Fix Version/s: None
    • Component/s: GUI: Font handling
    • Labels:
      None
    • Environment:
      Qt 6.2.0, macOS 11.6
    • Platform/s:
      macOS

      Description

      When "Hiragino Sans" font is set, strikeout is replaced with underline for entire string.

      This is important, because "Hiragino Sans" is correct font for Japanese (with default font some glyphs are rendered as Chinese variants, though the meaning is the same, look differs), so custom font family should be preferred, but it brings this bug.

      import QtQuick
      import QtQuick.Layouts
      import QtQuick.Window
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("你好,世界。")
      
          ColumnLayout {
              anchors.fill: parent
              anchors.margins: 10
              spacing: 10
      
              Text {
                  text: "default font:"
              }
      
              RowLayout {
                  spacing: 10
                  Layout.fillWidth: true
                  Text {
                      font.pixelSize: 24
                      font.strikeout: true
                      text: 'Text: 你好,世界。'
                  }
      
                  TextEdit {
                      font.pixelSize: 24
                      font.strikeout: true
                      readOnly: true
                      text: 'TextEdit: 你好,世界。'
                  }
              }
      
              Text {
                  text: "Hiragino Sans:"
              }
      
              RowLayout {
                  spacing: 10
                  Layout.fillWidth: true
                  Text {
                      font.pixelSize: 24
                      font.family: 'Hiragino Sans'
                      font.strikeout: true
                      text: 'Text: 你好,世界。'
                  }
                  TextEdit {
                      font.pixelSize: 24
                      font.family: 'Hiragino Sans'
                      font.strikeout: true
                      readOnly: true
                      text: 'TextEdit: 你好,世界。'
                  }
              }
          }
      }
      
      

      This is definitely not a font issue, because it's OK in native apps:

        Attachments

        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:
            sergei.nevdakh Sergei Nevdakh
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes