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

QTextDocument renders html with multiple font sizes differently on sequential runs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.5, 5.12.10
    • GUI: Font handling
    • None
    •  Qt version 5.9.5
      gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
      Ubuntu 18.04.5 LTS
    • Linux/X11

    Description

       

      When drawing a QTextDocument containing html text with a mix of font sizes to an image a subsequent draw of the same document results in a different output.

       

      From testing it appears to only fail for some font sizes (though does fail for both pixel and point specified, and the order the sizes are used also appears to be significant.

      e.g. 

      "<span style='font-size:100px'>100 px font</span> std"

      and

      "<span style='font-size:100pt'>100 pt font</span> std "

      fail, but

      "std <span style='font-size:100px'> 100 px font</span>"

      works, as does

      "std <span style='font-size:100px'> 100 px font</span> std"

       

      It also fails if you create two QTextDocuments containing the same text in the same way. 

       

      For the attached code on my local ubuntu xenial system I get the output and the included images (with diff generated using imagemagick)

      DejaVu Sans,12,-1,5,50,0,0,0,0,0
      failure
      

       

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            mdeterma Mark Determann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes