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

Mixing RTL and LTR language breaks QML Text layout

    XMLWordPrintable

Details

    Description

      Reproducer attached. Build it with 6.7.2 and run to see the issue.

      Basically, mixing up RTL and LTR languages seems to break text layout. Arabic, English, Chinese and German are put into 4 lines in that order for testing purpose. Totally 3 cases are tested (from top to bottom):
      label1: Just plain text
      label2: label1 + LayoutMirroring
      label3: label2 + horizontalAlignment
      However, none of them shows text in correct layout:

      Problems:
      1. Index of Chinese and German lines are prefixed. But those of Arabic and English are suffixed.
      2. Exclamation mark for German line is at the wrong end. It comes even before the index. But it is not a problem of language but (I think) a problem at the last line. If one removes the German line, then Chinese line also has its exclamation mark at the wrong end.

      What customer would like to see is a well formatted text like what HTML can offer:

      Attachments

        1. image-2024-07-04-11-02-48-876.png
          image-2024-07-04-11-02-48-876.png
          35 kB
        2. nettebook.png
          nettebook.png
          8 kB
        3. QTBUG-126867.7z
          1 kB
        4. screenshot-1.png
          screenshot-1.png
          38 kB
        5. screenshot-2.png
          screenshot-2.png
          20 kB
        6. screenshot-3.png
          screenshot-3.png
          19 kB

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              luqiaochen Luqiao Chen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes