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

QTextLayout::RetrieveStringIndexes seems broken for RTL texts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 6.5
    • GUI: Text handling
    • None

    Description

      I was experimenting with the new RetrieveStringIndexes API and it seems to have some problems with RTL texts:

          QTextLayout layout("مرحبا بالعالم");
      
          layout.beginLayout();
      
          QTextLine line = layout.createLine();
          assert(line.isValid());
      
          line.setLineWidth(QFIXED_MAX);
      
          QList<QGlyphRun> runs = line.glyphRuns(-1,-1,QTextLayout::RetrieveStringIndexes);
      
          for (auto run : runs) {
              qDebug() << "string indexes: " << run.stringIndexes();
          }
      
      //    string indexes:  QList(0, 0, 0, 0, 0, 0, 0)
      //    string indexes:  QList(0)
      //    string indexes:  QList(0, 1, 2, 3, 4)
      

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            paeglis Gatis Paeglis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes