This is really, really bad.... from qt/src/gui/painting/qpainter.cpp, inside void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justificationPadding)
I see this code: QStackTextEngine engine(str, d->state->font); engine.option.setTextDirection(d->state->layoutDirection); engine.itemize(); QScriptLine line; line.length = str.length(); engine.shapeLine(line); int nItems = engine.layoutData->items.size(); QVarLengthArray<int> visualOrder(nItems); QVarLengthArray<uchar> levels(nItems); for (int i = 0; i < nItems; ++i) levels[i] = engine.layoutData->items[i].analysis.bidiLevel; QTextEngine::bidiReorder(nItems, levels.data(), visualOrder.data()); Now... it seems like QTextEngine::bidiReorder() does exactly what you want logical->visual. However... this class is defined inside qtextengine_p.h... which means this is not official API. But, IMHO, even if it's not marked, you can open a bug report on this at Nokia's bug tracker, and they will handle it for Qt 4.8, maybe 4.7. Meanwhile, if the header is installed - abuse it. If it's not included - hack it inside your application (*) I know that this will not be accepted at KDE's svn ... On Monday 18 January 2010 16:28:57 Gadi Cohen wrote: > I'm now trying to implement this in Okular (instead of studying for my > exam, bad!). I've set up a KDE4 development environment, but have no > prior experience with KDE or Qt at all. _______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il