Skip to content
  • 0 Votes
    2 Posts
    282 Views
    R

    @stvsl said in Text Rendering Issue in Qt for MCU Applications:

    If you require additional details or examples to assist in the resolution process, please do not hesitate to reach out.

    You need to provide your exact system configuration, build steps, and other relevant details in order for anyone to look at your issue effectively.

  • 0 Votes
    7 Posts
    856 Views
    SGaistS

    @BEEDELL-ROKE-JULIAN-LOCKHART my bad, I did not saw that you were not the thread author. As such you cannot mark it solved.

  • 0 Votes
    7 Posts
    1k Views
    S

    Well, I think that the font doesn’t really matter here. Whatever font I use I get the same problem.
    Reported bug: https://bugreports.qt.io/browse/QTBUG-70184

  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • 0 Votes
    8 Posts
    3k Views
    J

    Glad to see you have you're problem fixed.

  • 0 Votes
    28 Posts
    15k Views
    WingsW

    Okay, so I studied @Chris-Kawa's answer again. And what hit me like a bolt of lightning is that what I was dreaming of doing is virtually nonsensical. Now I really understand what he was saying.

    This is what I wished to make happen (when I was naive :D):

    The background timer's timeout event, issues an update() command which draws immediately into the screen (like magic), which in turn, triggers a ~17ms single-shot timer. When that timer's timeout occurs, the text shown on the screen is cleared immediately (again magic). This keeps on looping till the user stops the background timer.

    This is what actually happens:

    Issue an update() command that "draws" the text (text is NOT shown yet). The single-shot timer (@~17ms) is triggered.
    ...probably some milliseconds elapsed (let this be x ms). At the vertical refresh moment, text becomes visible on screen. (this is damn fast, so I'm ignoring this interval)
    ...probably some milliseconds elapsed (let this be y ms) The single-shot timer has ended after ~(x+y) ms and a command to clear the text has been issued.
    ...probably some milliseconds elapsed (let this be z ms). At the vertical refresh moment, text is cleared from the screen. (ignoring this interval again)

    So, the user sees the text for about (x+y+z+k) ms where, k is the sum of the additional milliseconds used in actually doing that stuff. Now, x+y+z+k ms is almost always not equal to the desired interval.
    That's why, this process sucks, big time.

    Now, this is the best that can happen:

    Wait for the background timer to end. After it ends, as soon as a refresh cycle occurs, issue the command to draw the text. At the next refresh cycle, the text will be drawn to the screen. After the text is drawn, start the single-shot timer. After the timer has ended, issue the command to remove the text. Wait for the next refresh cycle. At the next refresh cycle, the text will be removed from the screen. Now, start the background time. Now go to the first step.

    Visualizing the process,
    please enable images

    Now, it is evident that showing the text exactly for 15ms is impossible using the previous method. But at least we can make sure that we don't show that more than ~32ms. And that's good news. At least in my case.

    Now, the point is how to achieve that. I don't know. But I'll find you and I'll kill you, nay implement you.

  • 0 Votes
    5 Posts
    3k Views
    A

    My problem is image delegate only.

    I found addiotional regularity: problematic delegates have the same picture as last top delegate hidden during scroll down within ListView.
    It seems scrolling out delegate from visible area forces it's image repaint in other delegates, which are in visible area.

    This repaint seems to hide the text element, declered with z-order above the image.
    Reset the visible property (visible=false, visible=true) at end of each scrolling (using onMovementEneded) solves the problem.
    But, i don't want to pay the repaint price of such solution as my application is running on embedded device.

  • 0 Votes
    2 Posts
    1k Views
    A

    I found a workaround:
    Define environment variable within Qt application startup context: QML_USE_GLYPHCACHE_WORKAROUND = 1

    Look on this topic:
    https://forum.qt.io/topic/39803/font-rendering-bug-on-some-android-devices/7