Skip to content

Text rending spaces (" ") in their own tspan when generating SVGs #80

@LucasReller

Description

@LucasReller

There appears to be a behavior with certain strings that are being written to SVGs where the spaces in the string are occasionally wrriten to their own TSpan. For example:

Input string:
"No Data Available"

Text field in SVG:  
<text x="0" y="0" transform="matrix(1,0,0,1,180.50145446777344,113.98666920979818)" stroke="none" fill="#000000" fill-opacity="1" font-size="13.333333333333332" font-family="Arimo-#" font-weight="bold" font-style="normal"><tspan>No Data</tspan><tspan> </tspan><tspan dx="-0.49479166666666663">A</tspan><tspan dx="-0.49479166666666663">vailable</tspan></text>

This will result in the SVG displaying properly of course, but we are running into an issue later in our processing that is caused by the space only tspan in the middle. Is there any way to change how VectSharp renderers text elements to prevent this from happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions