Rendering QTextEdit's content: different ways of getting glyphs indices give different results (for Kannada)



  • Hi All,

    Those different ways are the following:

    1. QTextEdit->QTextDocument->QTextBlock->QTextLayout->QGlyphRun->glyphIndexes()
    2. QTextEdit->QTextDocument->QTextBlock->QTextLayout->QGlyphRun->QRawFont->glyphIndicesForString()

    For the second method I pass the contents (QString) of QTextBlock. The problem is that thre returned indices differ for these two methods, though text and raw font must be the same.

    The reason why I'm using two method is that in addition to rendering the text I need to build a map of characters and their bounding rectangles. The rectangles are calculated using glyph indices and the raw font. The second way allows building of such a map since I can get glyph indices for specific characters, while the first method gives only glyph indices (the is no way to get source characters for glyph indices).

    The problem appears only for complicated scripts (I revealed it for Kannada script).

    Can I treat is a bug?

    Any help is very appreciated.

    Thanks!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.