Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Rendering QTextEdit's content: different ways of getting glyphs indices give different results (for Kannada)
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 960 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    az_personal
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved