Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-508

SVG pretty printer screws up <text><tspan>..</tspan></text> sequence

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: Utilities
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other

      Description

      The SVG pretty printer inserts whitespace between adjacent
      <text><tspan> tags, semantically corrupting the SVG file.

      I have two SVG files, one of which is simply a pretty printed version
      of the other (i.e., they have the exact same XML tag structure), yet
      Batik displays them differently.

      This seems to be because the original contains these tags

      <text ...><tspan>...</tspan></text>

      and the pretty printer is inserting space between the <text> and
      <tspan> tags. These spaces are then causing the text to be shifted
      to the right when Batik displays the pretty-printed version.

      I worked arond this problem simply by removing the <tspan> tags,
      which weren't really doing anything in my case.

        Attachments

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              archie Archie Cobbs
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: