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. How to get a QGlyphRun for a single character?
Forum Updated to NodeBB v4.3 + New Features

How to get a QGlyphRun for a single character?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 245 Views
  • 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.
  • D Offline
    D Offline
    ddze
    wrote on last edited by
    #1

    Hi,
    I want to get a QGlyphRun for a single character and the way I do is:

        QCharRef c = text[text.length()-1];
        QTextLayout *pTextLayout = new QTextLayout(QString(c));
        pTextLayout->setFont(font);
        pTextLayout->beginLayout();
        pTextLayout->createLine();
        pTextLayout->endLayout();
        QList<QGlyphRun> glyphData = pTextLayout->glyphRuns();
    

    Is there a quicker way of doing it ?

    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