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

QSvgRenderer::boundsOnElement incorrect when <text> node contains <tspan>

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.6.3
    • SVG Support
    • None
    • All

    Description

      Example: <text font-size="12px"><tspan font-size"5px">qt svg bugs </tspan></text>

      1) Height incorrect. QSvgRenderer::boundsOnElement calculates the bounds of the text element using text width of the `tspan` but faultly the text height of the `text` element that might have another font size.

      2) Width of a `tspan` will also always be one character too wide.

      Note, that the height of a `text` element is always equal to the line height, regardless of the text content. I consider this a feature.

      Attachments

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

        Activity

          People

            hatemelkharashy Hatem ElKharashy
            bensay Benjamin Bræstrup Sayoc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes