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. Broken font kerning when using scaled QGraphicsVIew
Forum Updated to NodeBB v4.3 + New Features

Broken font kerning when using scaled QGraphicsVIew

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

    This is what drawing text via painter.drawText in a QGraphicsView that is scaled looks like. You can see that the 'w' character seems to have very broken font kerning, and there are other issues here as well, like 'as' is bunched together.

    f5da8b7e-4d0b-4023-a658-c4fd2a5718da-image.png

    It also breaks when scaled out, notice how "Output" is also rendering funny:
    1758bc09-47c9-420b-a8e0-18fa62dfaaa4-image.png

    For reference, it looks fine unscaled:
    091b704e-7867-40bb-a5d2-364a5f88eda5-image.png

    QGraphicsProxyWidget items suffer form the same problem, if this was a line edit widget it would also be weird. This kind of makes scaling a QGraphicsView fundamentally broken if your scene contains text, unless there is some magic flag somewhere I am missing that could help fix this (maybe just select the next font size and render that instead?)

    edit: I should mention we're using Qt 5.15.1 although it has been like this for as long as I have been using QGraphicsView

    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