Important: Please read the Qt Code of Conduct -

Broken font kerning when using scaled QGraphicsVIew

  • 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.


    It also breaks when scaled out, notice how "Output" is also rendering funny:

    For reference, it looks fine unscaled:

    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

Log in to reply