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

Overlapping characters when painting QGraphicsTextItem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.3.1
    • GUI: Printing
    • None
    • Qt 5.3.1, Windows

      The following problems occurs with one specific font ("WsC Swiss") which is included in the attached repro case:

      Printing a QGraphicsTextItem as PDF via a QPainter object and the render() method causes the characters in the text to overlap. You can see the problem in the attached screenshot and "test_pdf_paint.pdf" file.

      Printing the same item as PDF via the print() method, bypassing QPainter, works without any problems (see attached "test_pdf_print.pdf" file). Rendering the same item to an image or printing it to a physical printer, both using QPainter, works fine as well.

      I have built a small sample project case to reproduce the problem. You will find it attached to this email ("ReproCase.zip"). The relevant font file is included in that package.

      I tried to debug the problem, but honestly have no idea how to solve it. It seems to be specific to painting a PDF file with that font. Since the font works in all other cases I don't think it is a bug in the font itself.

      Any help would be awesome.

        1. ReproCase.zip
          150 kB
        2. screenshot.png
          screenshot.png
          81 kB
        3. test_pdf_paint.pdf
          5 kB
        4. test_pdf_print.pdf
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            johnlayt John Layt
            zottel78 Fabian Roeken
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes