Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
6.5
-
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)