Unexpected behavior in version Inkscape 1.1 (c68e22c387, 2021-05-23)
Hi all,
I'm using Inkscape 1.1 (c68e22c387, 2021-05-23), and running into unexpected behavior with text, as explained below:
My drawing has a text item with hard newlines and specific spacing between baselines (1.1). I save it as plain SVG, close the file, then reopen it. The text item's baseline to baseline appears to have reverted to 1.0, but the text now appears to be on one line, and if I insert newlines, everything just gets jumbled together on the same line. If I add material, different lines have different baseline to baseline distances.
The bottom line is I have to completely recreate the text item from scratch on every edit, which slows things to say the least.
This is probably intermittent, because I have another text item that so far, from minimal investigation, appears not to have this problem.
I can also tell you that I seem to remember problems like this (rarely) in earlier versions, but I can't remember any details.
* Has anybody else encountered this?
* Can anybody tell me what I'm doing wrong, and how to do it right?
Thanks,
SteveT
Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques
Steve Litt said on Wed, 16 Jun 2021 16:24:22 -0400
Hi all,
I'm using Inkscape 1.1 (c68e22c387, 2021-05-23), and running into unexpected behavior with text, as explained below:
My drawing has a text item with hard newlines and specific spacing between baselines (1.1). I save it as plain SVG, close the file, then reopen it. The text item's baseline to baseline appears to have reverted to 1.0, but the text now appears to be on one line, and if I insert newlines, everything just gets jumbled together on the same line. If I add material, different lines have different baseline to baseline distances.
The bottom line is I have to completely recreate the text item from scratch on every edit, which slows things to say the least.
This is probably intermittent, because I have another text item that so far, from minimal investigation, appears not to have this problem.
I can also tell you that I seem to remember problems like this (rarely) in earlier versions, but I can't remember any details.
Has anybody else encountered this?
Can anybody tell me what I'm doing wrong, and how to do it right?
I've looked into this a little more. What appears to be happening is that, at least when saved as plain SVG, re-editing that file with Inkscape does not recalculate the x and y values of the <tspan/> subelements. Even if you change the baseline spread. Thus the unrecoverable line spacing.
So the x and y coordinates of each <tspan/> must be recalculated, whether or not the file under edit was Plain SVG or Inkscape SVG. Otherwise using multiline text is useless, and instead of having a 4 line piece of text, you'd just use 4 text elements and space and align them, which is a pain the petunias, but not half as bad these multiline texts that, once saved as Plain SVG, must be recreated from scratch.
Recalculation is needed. I can tell you a method to make such recalculation quite a bit easier. Instead of using the x and y properties of a <tspan/>, use the dx and dy values. Then the <text/>'s baseline spread value can be assigned to the <tspan/>'s dy value. The dx value of <tspan/> would be a simple equation based on line length, and in fact would be zero for left justified text.
Until this thing's fixed I'll use one text item per line desired, but I can tell you this is a slowdown and a workflow productivity problem.
Thanks,
SteveT
Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques
Hi Steve,
looks like you could be describing a bug that's already in the bug tracker.
Please compare whether one of these is your issue (I didn't read the detailed descriptions):
https://gitlab.com/inkscape/inkscape/-/issues/2378 https://gitlab.com/inkscape/inkscape/-/issues/1535 https://gitlab.com/inkscape/inbox/-/issues/337
If not, don't hesitate to open a new one.
In most cases, the bug tracker is a better place to find out more about and report bugs.
Regards Maren
Am 17.06.21 um 04:17 schrieb Steve Litt:
Steve Litt said on Wed, 16 Jun 2021 16:24:22 -0400
Hi all,
I'm using Inkscape 1.1 (c68e22c387, 2021-05-23), and running into unexpected behavior with text, as explained below:
My drawing has a text item with hard newlines and specific spacing between baselines (1.1). I save it as plain SVG, close the file, then reopen it. The text item's baseline to baseline appears to have reverted to 1.0, but the text now appears to be on one line, and if I insert newlines, everything just gets jumbled together on the same line. If I add material, different lines have different baseline to baseline distances.
The bottom line is I have to completely recreate the text item from scratch on every edit, which slows things to say the least.
This is probably intermittent, because I have another text item that so far, from minimal investigation, appears not to have this problem.
I can also tell you that I seem to remember problems like this (rarely) in earlier versions, but I can't remember any details.
Has anybody else encountered this?
Can anybody tell me what I'm doing wrong, and how to do it right?
I've looked into this a little more. What appears to be happening is that, at least when saved as plain SVG, re-editing that file with Inkscape does not recalculate the x and y values of the <tspan/> subelements. Even if you change the baseline spread. Thus the unrecoverable line spacing.
So the x and y coordinates of each <tspan/> must be recalculated, whether or not the file under edit was Plain SVG or Inkscape SVG. Otherwise using multiline text is useless, and instead of having a 4 line piece of text, you'd just use 4 text elements and space and align them, which is a pain the petunias, but not half as bad these multiline texts that, once saved as Plain SVG, must be recreated from scratch.
Recalculation is needed. I can tell you a method to make such recalculation quite a bit easier. Instead of using the x and y properties of a <tspan/>, use the dx and dy values. Then the <text/>'s baseline spread value can be assigned to the <tspan/>'s dy value. The dx value of <tspan/> would be a simple equation based on line length, and in fact would be zero for left justified text.
Until this thing's fixed I'll use one text item per line desired, but I can tell you this is a slowdown and a workflow productivity problem.
Thanks,
SteveT
Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques _______________________________________________ Inkscape Users mailing list -- inkscape-user@lists.inkscape.org To unsubscribe send an email to inkscape-user-leave@lists.inkscape.org
:-)
Thanks Maren,
Two of those three bugs you referenced in the bug tracker are over a year old. None of them have done any real work done on them, other than changing the title, etc. Looks to me like the bug tracker is a good place to get a bug ignored.
So has anyone else observed the symptom I described earlier in this thread? Let's put our heads together, figure out the root cause, and make it easy for the developers to fix it. If nothing else, with a root cause known, I'll create a Python program to repair affected SVG files.
SteveT
Maren Hachmann said on Thu, 17 Jun 2021 13:16:42 +0200
Hi Steve,
looks like you could be describing a bug that's already in the bug tracker.
Please compare whether one of these is your issue (I didn't read the detailed descriptions):
https://gitlab.com/inkscape/inkscape/-/issues/2378 https://gitlab.com/inkscape/inkscape/-/issues/1535 https://gitlab.com/inkscape/inbox/-/issues/337
If not, don't hesitate to open a new one.
In most cases, the bug tracker is a better place to find out more about and report bugs.
Am 17.06.21 um 04:17 schrieb Steve Litt:
Steve Litt said on Wed, 16 Jun 2021 16:24:22 -0400
Hi all,
I'm using Inkscape 1.1 (c68e22c387, 2021-05-23), and running into unexpected behavior with text, as explained below:
My drawing has a text item with hard newlines and specific spacing between baselines (1.1). I save it as plain SVG, close the file, then reopen it. The text item's baseline to baseline appears to have reverted to 1.0, but the text now appears to be on one line, and if I insert newlines, everything just gets jumbled together on the same line. If I add material, different lines have different baseline to baseline distances.
The bottom line is I have to completely recreate the text item from scratch on every edit, which slows things to say the least.
This is probably intermittent, because I have another text item that so far, from minimal investigation, appears not to have this problem.
I can also tell you that I seem to remember problems like this (rarely) in earlier versions, but I can't remember any details.
Has anybody else encountered this?
Can anybody tell me what I'm doing wrong, and how to do it right?
I've looked into this a little more. What appears to be happening is that, at least when saved as plain SVG, re-editing that file with Inkscape does not recalculate the x and y values of the <tspan/> subelements. Even if you change the baseline spread. Thus the unrecoverable line spacing.
So the x and y coordinates of each <tspan/> must be recalculated, whether or not the file under edit was Plain SVG or Inkscape SVG. Otherwise using multiline text is useless, and instead of having a 4 line piece of text, you'd just use 4 text elements and space and align them, which is a pain the petunias, but not half as bad these multiline texts that, once saved as Plain SVG, must be recreated from scratch.
Recalculation is needed. I can tell you a method to make such recalculation quite a bit easier. Instead of using the x and y properties of a <tspan/>, use the dx and dy values. Then the <text/>'s baseline spread value can be assigned to the <tspan/>'s dy value. The dx value of <tspan/> would be a simple equation based on line length, and in fact would be zero for left justified text.
Until this thing's fixed I'll use one text item per line desired, but I can tell you this is a slowdown and a workflow productivity problem.
Thanks,
SteveT
Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques _______________________________________________ Inkscape Users mailing list -- inkscape-user@lists.inkscape.org To unsubscribe send an email to inkscape-user-leave@lists.inkscape.org
Inkscape Users mailing list -- inkscape-user@lists.inkscape.org To unsubscribe send an email to inkscape-user-leave@lists.inkscape.org
SteveT
Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques
Yes, of course, take the initiative on the corresponding report!
Often, all it takes is someone to add info to it, or to suggest a way for a solution (if there isn't one yet).
There are many reports, and not every one of them has a capable helpful user behind it driving it forwards.
It's maybe going to help people find a workaround if a Python script is posted on the issue, at least.
Maren
Am 17.06.21 um 15:21 schrieb Steve Litt:
:-)
Thanks Maren,
Two of those three bugs you referenced in the bug tracker are over a year old. None of them have done any real work done on them, other than changing the title, etc. Looks to me like the bug tracker is a good place to get a bug ignored.
So has anyone else observed the symptom I described earlier in this thread? Let's put our heads together, figure out the root cause, and make it easy for the developers to fix it. If nothing else, with a root cause known, I'll create a Python program to repair affected SVG files.
SteveT
Maren Hachmann said on Thu, 17 Jun 2021 13:16:42 +0200
Hi Steve,
looks like you could be describing a bug that's already in the bug tracker.
Please compare whether one of these is your issue (I didn't read the detailed descriptions):
https://gitlab.com/inkscape/inkscape/-/issues/2378 https://gitlab.com/inkscape/inkscape/-/issues/1535 https://gitlab.com/inkscape/inbox/-/issues/337
If not, don't hesitate to open a new one.
In most cases, the bug tracker is a better place to find out more about and report bugs.
Am 17.06.21 um 04:17 schrieb Steve Litt:
Steve Litt said on Wed, 16 Jun 2021 16:24:22 -0400
Hi all,
I'm using Inkscape 1.1 (c68e22c387, 2021-05-23), and running into unexpected behavior with text, as explained below:
My drawing has a text item with hard newlines and specific spacing between baselines (1.1). I save it as plain SVG, close the file, then reopen it. The text item's baseline to baseline appears to have reverted to 1.0, but the text now appears to be on one line, and if I insert newlines, everything just gets jumbled together on the same line. If I add material, different lines have different baseline to baseline distances.
The bottom line is I have to completely recreate the text item from scratch on every edit, which slows things to say the least.
This is probably intermittent, because I have another text item that so far, from minimal investigation, appears not to have this problem.
I can also tell you that I seem to remember problems like this (rarely) in earlier versions, but I can't remember any details.
Has anybody else encountered this?
Can anybody tell me what I'm doing wrong, and how to do it right?
I've looked into this a little more. What appears to be happening is that, at least when saved as plain SVG, re-editing that file with Inkscape does not recalculate the x and y values of the <tspan/> subelements. Even if you change the baseline spread. Thus the unrecoverable line spacing.
So the x and y coordinates of each <tspan/> must be recalculated, whether or not the file under edit was Plain SVG or Inkscape SVG. Otherwise using multiline text is useless, and instead of having a 4 line piece of text, you'd just use 4 text elements and space and align them, which is a pain the petunias, but not half as bad these multiline texts that, once saved as Plain SVG, must be recreated from scratch.
Recalculation is needed. I can tell you a method to make such recalculation quite a bit easier. Instead of using the x and y properties of a <tspan/>, use the dx and dy values. Then the <text/>'s baseline spread value can be assigned to the <tspan/>'s dy value. The dx value of <tspan/> would be a simple equation based on line length, and in fact would be zero for left justified text.
Until this thing's fixed I'll use one text item per line desired, but I can tell you this is a slowdown and a workflow productivity problem.
Thanks,
SteveT
Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques _______________________________________________ Inkscape Users mailing list -- inkscape-user@lists.inkscape.org To unsubscribe send an email to inkscape-user-leave@lists.inkscape.org
Inkscape Users mailing list -- inkscape-user@lists.inkscape.org To unsubscribe send an email to inkscape-user-leave@lists.inkscape.org
SteveT
Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques _______________________________________________ Inkscape Users mailing list -- inkscape-user@lists.inkscape.org To unsubscribe send an email to inkscape-user-leave@lists.inkscape.org
participants (2)
-
Maren Hachmann
-
Steve Litt