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

Thai character causes display failure on Mac

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.0
    • 4.5.0
    • GUI: Text handling
    • None
    • macOS
    • 420be4ee3d98c093c71cc840192138da6b5e61d2

    Description

      Build the attached main.cpp against Qt 4.6

      It contains a UTF-8 string from http://www.columbia.edu/kermit/utf8.html :

      ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ

      The 20th character - ำ - causes an assert in debug mode and a failure to render.

      ASSERT: "num_glyphs <= length" in file /Users/sarasmit/depot/qt/qt/src/gui/text/qtextengine_mac.cpp, line 53

      Note that this character corresponds to two seperate glyphs - glyphID's 103 and 78 - hence the "num_glyphs" is one greater than the "length".

      The attached image shows this character being rendered by the QtCreator editor (highlighted in blue, showing the two seperate sections). Note that removing this character from the string will cause the complete Thai string to render, with no assert.

      This bug was discovered while resolving QTBUG-4442

      Attachments

        1. glyph-of-death.png
          glyph-of-death.png
          13 kB
        2. main.cpp
          0.9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sarasmit Sarah Smith (closed Nokia identity) (Inactive)
            sarasmit Sarah Smith (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes