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

Mac - Strikeout bugged in QML TextEdit for Japanese

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.15.16, 6.2.8, 6.4.3, 6.5.0, 6.6.0
    • 6.2.0, 6.2.4
    • GUI: Font handling
    • None
    • Qt 6.2.4, macOS 12.3.1
    • macOS
    • 5d082dc9b (dev), 1f3ca02be (6.5), d84357158 (6.4), fcacc00bc (tqtc/lts-6.2), 2ed5b1dd3 (tqtc/lts-5.15)

    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

        1. Screenshot 2021-10-18 at 4.48.12 PM.png
          141 kB
          Sergei Nevdakh
        2. Screenshot 2021-10-18 at 4.54.11 PM.png
          168 kB
          Sergei Nevdakh

        Issue Links

          For Gerrit Dashboard: QTBUG-97594
          # Subject Branch Project Status CR V

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              sergei.nevdakh Sergei Nevdakh
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes