Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-18185

QStaticText: Wrong kerning and baselines when rotating a QGraphicsView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.4
    • 4.7.2
    • GUI: Font handling
    • None
    • MeeGo Harmattan
    • e159f97f6ecefb49d50a82b1084fd1b1b9e5e2cf

    Description

      QStaticText: Wrong kerning and baselines when rotating a QGraphicsView

      If QStaticText is used with the "Nokia Pure" font it seems some initialization is missing in combination with a rotated QGraphicsView and the "raster" graphicssystem.

      To reproduce:
      Run the attached Qt-only example on the harmattan device with the option "-graphicssystem raster". It is important that the "Nokia Pure" font is used, the issue does not occur with fonts like Arial or Times. Also the used pointsize seems to matter, the issue can be best seen when using 18 like in the example.

      Expected behavior:
      The text kerning and baseline should be correct.

      Actual behavior:
      The baseline differs for each glyph by +/- 3 pixels - it looks like a "wave". Also the kerning is not identical to the case when no rotation is done. The issue does not occur when the native graphicssystem is used (MeeGo in our case).

      Additional information:
      A very interesting point is that when uncommenting the line
      painter->drawText(0, 0, text);
      from the sample application, suddenly the issue when drawing QStaticText does not occur anymore. It seems like the QPainter::drawText() does a kind of initialization that is missing in QStaticText when calling QPainter::drawStaticText().

      Trigger of this report: https://projects.maemo.org/bugzilla/show_bug.cgi?id=236413 for details.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            ppenz Peter Penz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes