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

QTextEdit with Consolas font: a line that ends with Hindi characters breaks the font of the next line

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.1, 5.15.2, 6.0.0, 6.0.1
    • GUI: Text handling
    • None
    • Windows 10
    • Windows

    Description

      This bug can be reproduced in all versions which I tried, including Qt 5.15 and Qt 6.

      The simplest way to reproduce it does not even require creating any projects or writing C++ code:
      1) open Qt Designer;
      2) create a new Widget;
      3) insert a new QTextEdit into that Widget, set its font to Consolas, assign the following HTML to it: (see "html_1.txt" in the attachments).

      Actual result: the spaces on the line after the one with Hindi characters get shrunk; the font of that line seems to be reset to some other one instead of Consolas (see the attached screenshot "qtbug_1.png").

      Expected result: same offsets on all lines which contain 4 spaces at their beginning; font does not change.

       

      Here's a more contrived yet more illustrative example:

      (see "html_2.txt", "qtbug_2.png" and "explanations.png" in the attachments)

      Attachments

        1. explanations.png
          explanations.png
          47 kB
        2. html_1.txt
          0.2 kB
        3. html_2.txt
          0.5 kB
        4. qtbug_1.png
          qtbug_1.png
          7 kB
        5. qtbug_2.png
          qtbug_2.png
          8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            taras_ Taras Q
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes