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

svg <text> with <tspan> elements when the <text> element has its own text is not displayed correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.6.2
    • SVG Support
    • None
    • Windows 7, Qt 4.6.0, but also reported under Linux/Fedora

      In the attached file, there is a <text> element which contains a <tspan> element, and there are some spaces between <text ...> <tspan ...>. If you display this image in Inkscape or Chrome, the text ("pwr1" ) is almost left-aligned with the black rectangle beneath, but if you display this image in Qt (for example, using the SvgViewer demo), the text is shifted somewhat to the right. If you remove the xml:space="preserve" attribute, or remove the spaces between <text> and <tspan>, then Qt's display matches Inkscape's (or Chrome's). However, the difference between the way the three programs handles this case becomes more pronounced if you put some non-whitespace text in the file. For example <text ...> hello <tspan ... >

      It may be that Qt's implementation is correct, and Chrome and Inkscape have it wrong...

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

            kkalland Kim Motoyoshi Kalland (Inactive)
            irascible Jonathan Cohen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes