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

Blurry QML text when centered (OpenVG/Symbian)

    XMLWordPrintable

    Details

    • Commits:
      7abb03d75155cef86df58f117031b092b637876f

      Description

      It is already known that the OpenVG paint engine (is the only paint engine which) draws text at non-integer coordinates, and that this leads to blurry texts on some OpenVG implementations such as the one on N8. QTBUG-12330 Was related to QGraphicsTextItem and some added workarounds in qpaintengine_vg.cpp avoided the blurriness for a few cases. Apparently, these workarounds do not help with QML.

      QML did not have the issue till 4.7.1, since text in QML was rendered with raster, which creates crisp text by implicitly rounding text coordinates to integer values. In 4.7.2 QML changed from using the raster paint engine for text to use the active graphics system + QStaticText. On Symbian^3, the standard active graphics system is OpenVG.

      It is very easy to get non-integer coordinates for text. Just horizontally center the text in a Text item (item with fixed width) and you have a 50% chance that the x-coordinate is non-integer.

      I see the following possible solutions to the problem:

      • Fix the OpenVG paint engine once for all to use integer coordinates at least for unscaled text, whose rotation angle is dividable by 90. This needs to be done by someone who understands which are the QTransforms that influence the coordinates in QVGPaintEngine::drawCachedGlyphs(). My experimental attempts were not enough.
      • Round the coordinates of the drawn, centered text in QML
      • Revert to the old way of text rendering for QML on Symbian when OpenVG is active
      • Tell the developer to use an set OpenGL viewport. Yes, that creates always crisp text. The new Qt Quick Application wizard cold do that.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              esabraha Eskil Abrahamsen Blomfeldt
              Reporter:
              portale Alessandro Portale
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes