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

<span> HTML tag changes size of sceneBoundingRect() width in QGraphicsTextItem of QGraphicsScene

    XMLWordPrintable

Details

    Description

      With specific fonts (and font versions) the sceneBoundingRect() width value changes when adding <span> element that wraps some text.

      Steps to reproduce:

      • Run attached sample with any specified font
      • EXPECTED: Width values are same with or without the wrapping <span> tags.
      • ACTUAL: The width value changes slightly.

      This can also be reproduced on Windows, but with far less fonts (or font versions) than on OSX.

      Reproducible at least on these fonts:

      "Arial", "Avenir Next", "Avenir Next Condensed",
      "Brush Script MT", "Chalkboard", "Chalkboard SE",
      "Constantia", "Corbel", "Devanagari Sangam MN",
      "Didot", "Gill Sans", "Gurmukhi MN", 
      "Gurmukhi Sangam MN", "Helvetica", "Herculanum",
      "Kannada MN", "Khmer MN", "Khmer Sangam MN",
      "Lao MN", "Lao Sangam MN", "Malayalam MN",
      "Myanmar MN", "Optima", "Oriya MN",
      "Palatino", "Palatino Linotype", "PT Sans",
      "PT Sans Caption", "PT Sans Narrow", "Tamil MN",
      "Tamil Sangam MN", "Telugu MN", "Times", 
      "Times New Roman",
      

      Attachments

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

        Activity

          People

            mmutz Marc Mutz
            jussi_witick Jussi Witick
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes