Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-26263

bold:true can't set with italic:true and family:"Microsoft YaHei"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.13.2
    • Quick / QML Support
    • None
    • desktop
    • Windows

    Description

      This is the sample code.
      "你好 italic bold" shows messy codes.
      See attached picture.
      Platform is Windows 10 localized simplified Chinese, these codes work properly on Japanese localization Windows.

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          Text {
              id: name1
              text: qsTr("你好 normal")
              font.family: "Microsoft YaHei"
              font.pointSize: 40
              font.bold: false
              font.italic: false
          }
          Text {
              y: 60
              id: name2
              text: qsTr("你好 italic")
              font.family: "Microsoft YaHei"
              font.pointSize: 40
              font.bold: false
              font.italic: true
          }
          Text {
              y: 120
              id: name3
              text: qsTr("你好 bold")
              font.family: "Microsoft YaHei"
              font.pointSize: 40
              font.bold: true
              font.italic: false
          }
          Text {
              y: 180
              id: name4
              text: qsTr("你好 italic bold")
              font.family: "Microsoft YaHei"
              font.pointSize: 40
              font.bold: true
              font.italic: true
          }
      }
      

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            xugang xu gang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes