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

QPainter's drawText method can't paint unicode characters with code values above 65535

    XMLWordPrintable

Details

    • Linux/X11, Windows
    • 4a5abfcea (dev)

    Description

      Steps to Reproduce

      Run the Wiggle Example (https://doc.qt.io/qt-6/qtwidgets-widgets-wiggly-example.html ) and copy + paste some affected text into the QLineEdit:

      (Fun fact: JIRA crashes if I include those characters directly in this description)

       

      Outcome

      The text renders correctly in the QLineEdit but not in the WigglyWidget.

       

       

      Original Report

      http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=22489
      This Chinese character will be stored using surrogate pairs, QPainter's drawText method can't paint this character, and QTextEdit can't display this character too. In both test, I use a font named "SimSun".
      The same character can be displayed by other programs in my computer.

      Attachments

        Issue Links

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

          Activity

            People

              vgt Eirik Aavitsland
              bobwu paperspace@qq.com
              Votes:
              4 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes