Inkscape Community

Help Using Inkscape => Inkscape Beginners' Questions => Topic started by: Krzysztof on November 15, 2018, 01:13:14 AM

Title: Svgz where texts are only single-line, how to fix this?
Post by: Krzysztof on November 15, 2018, 01:13:14 AM
I got graphic which I need to modify. The text objects behaving like single-line - You can't make a new line where You are at last character and pressing enter key (seems to not react), and if key enter is pressed in the middle of text everything what was after cursor becomes a new text object and gets the same coordinates as original and covers the original.
This graphic was prepared in some older inkscape like 0.48. I try to edit it under 0.92.3.
If i need to replace every text objects with new working multi-line objects it won't be funny ...
Example attached.
Title: Re: Svgz where texts are only single-line, how to fix this?
Post by: Moini on November 15, 2018, 06:35:19 AM
You need to use a text editor to fix this.

Do this:

- Save file as Inkscape-SVG
- Open file with text editor (e.g. notepad++)
- search for all occurrances of <tspan
- replace them with <tspan sodipodi:role="line"
(make sure there is a space before the next word in the SVG)
- Save.

I think the problem was that this file has somewhere in between not been saved as Inkscape SVG, which has removed that 'sodipodi:role' item. I think this is a bug (that it's not restored, when the file is loaded). But it's possible to fix for your file.
Hope it works out!
Title: Re: Svgz where texts are only single-line, how to fix this?
Post by: brynn on November 15, 2018, 08:26:47 AM
Could part of the problem be related to this bug:  https://bugs.launchpad.net/inkscape/+bug/366744  ?
The part where it says if it was saved as Plain SVG, the enter key puts the new line where the original line started.  Maybe SVGZ is having the same problem as Plain SVG?

There is an extension to fix that, but I'm not sure if it will fix your problem.  Moini probably knows.  Just in case:  https://github.com/chelobaka/fix-text-lines
Title: Re: Svgz where texts are only single-line, how to fix this?
Post by: Moini on November 16, 2018, 08:28:34 AM
Yes, that extension does exactly what I described.