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

QTextLayout draw() rendering issues with "some" font sizes



    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.10.0, 5.13.0
    • Fix Version/s: 5.12.0 Alpha
    • Component/s: GUI: Painting
    • Labels:
    • Environment:
      Can be reproduced with latest Qt on at least X11 and macOS (you just need to zoom in your text document, you surely will hit some font size that is bad)
    • Commits:


      Different applications using the QTextLayout mechanism to render text have the same rendering glitches with some font sizes.

      You will get horizontal or vertical "non-filled" pixels in your textlines.

      E.g. If you have some "white" background and paint over text with some different background, you sometimes will get small "gaps" in the painted text.

      This happens e.g. on X11 or macOS.

      Example bug in Kate/KWrite (that uses QTextLayout directly without QTextDocument) can be seen here (horizontal lines, the same can happen vertically):





      Effect with QtCreator using 5.10.0 on macOS:



      Given two totally different code bases have the same issue (and QtCreator uses QTextDocument), I think this is some rendering issue in Qt.


        1. Bildschirmfoto 2018-01-27 um 16.50.19.png
          110 kB
          Christoph Cullmann
        2. Bildschirmfoto 2018-02-10 um 21.00.11.png
          37 kB
          Christoph Cullmann
        3. Bildschirmfoto 2018-02-10 um 21.00.19.png
          38 kB
          Christoph Cullmann
        4. kwrite_scale_1_2_qrect_clip.png
          321 kB
          Christoph Cullmann
        5. kwrite_scale_1_2_qrectF_clip.png
          320 kB
          Christoph Cullmann
        6. screenshot.png
          49 kB
          Christoph Cullmann
        7. vertical_white_lines.png
          119 kB
          Christoph Cullmann
        8. white_artifacts.png
          10 kB
          Christoph Cullmann
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            • Assignee:
              sletta Gunnar Sletta
              cullmann Christoph Cullmann
            • Votes:
              7 Vote for this issue
              11 Start watching this issue


              • Created:

                Gerrit Reviews

                There are no open Gerrit changes