I just used painter->drawText() to draw Arabic text(more than two lines)... but it display absolutely wrong! while i use QML to draw arabic text, it displays right....I am soooo confused, ive debuged the code, the glyph position( of course the positions are all wrong),,,, i thought it's the problem of new version harfbuzz-ng....but what confused me most that QML text and painter->drawtext() they are use the same harfbuzz ( i set a break point in harfbuzz-arabic.c) .... I am always thinking it's not hard for Qt itself to find out this bug,,,so how it happened like that? or i miss something? (i set the layout and wrapmode already,still same problem)....anyone could pls give me a hand?


Reply With Quote

Yep, i just tried what you told me here, it works right for arabic and mix texts...but they must also share the same harfbuzz, what do you think of QPainter->drawText(), did you try the to use this one to draw text? same problem with me, right? QTextDocument may could be a good replacement, but dtawText is also widely used, i really wanna know what's wrong with it, ive debugged it(from the function "getGlyphPosition") but dont really know where the problem is...


aintEvent(QPaintEvent *)

Bookmarks