When exporting a file to SVG with text fields (ASCII art in my case) multiple spaces are written as simple consequent spaces in the XML file.
Unfortunately XML, as HTML, will display these as a single space. Declaring xml:space="preserve" as you do, unfortunately does not suffice, because it works only if the string contains only spaces. A better approach would be to use non-breaking spaces:
To keep the XML more readable you could code it to change from simple to non-breaking spaces only from the second consequent (included) onwards, so that normal prose would not be cluttered. Just a thought.
Thank you in advance.