"Flowtext to text" results in wrong alignment

Bug #497469 reported by Petteri Aimonen
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned
inkscape (Debian)
Confirmed
Unknown

Bug Description

Steps to reproduce in Inkscape 0.47pre4:
1. Create new document
2. Drag with text tool to create flowed text.
3. Type several lines of flowed text. Lines should be of different lengths so that alignment is visible.
4. Align to center or right.
5. Select Text -> Convert to text
6. Alignment of the resulting text is wrong.
7. Selecting "Align left" from text toolbar fixes the problem.

Tags: text
su_v (suv-lp)
tags: added: text
Revision history for this message
su_v (suv-lp) wrote :

reproduced with Inkscape 0.47 r22583 on OS X 10.5.8

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

reproduced with Inkscape 0.48+devel r9823 on OS X 10.5.8

possibly related:
Bug #591852 “text position moves when switching between flush left and flush right”
<https://bugs.launchpad.net/inkscape/+bug/591852>

Changed in inkscape (Debian):
status: Unknown → Confirmed
Revision history for this message
Joshua Gitlin (jgitlin) wrote :

Any news on this bug? It's affecting my customers as well.

Revision history for this message
su_v (suv-lp) wrote :

> Any news on this bug?

No (else it would have been either commented about, or the bug status would have been updated accordingly).

Also present in current trunk (Inkscape 0.48+devel r11575).

Revision history for this message
Joshua Gitlin (jgitlin) wrote :

The issue I am finding is that I am using the Inkscape Verb inkscapeFlowtextToTextArgs to convert flowed text to tspans, but there is no verb to left align in order to correct the alignment. This leaves me with **no workaround** and means the SVG files I generate using Inkscape are incorrect.

Revision history for this message
Petteri Aimonen (jpa-lp) wrote :

I originally noticed the bug in the exact same use case: using inkscape from command line to convert flow texts to the more widely supported normal text objects.

I have used the following workaround:

sed 's/text-align:center;text-anchor:middle/text-align:start;text-anchor:start/' -i "$TMP"
sed 's/text-align:end;text-anchor:end/text-align:start;text-anchor:start/' -i "$TMP"

su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
Joshua Gitlin (jgitlin) wrote :

@Petteri Aimonen, forgive me if I am being dense but won't that just left-align all centered text? How do you get it to be centered again? I assume you're running those replacements on the SVG 1.2 as the SVG 1.1 won't have any text-align, isn't that correct?

Revision history for this message
Petteri Aimonen (jpa-lp) wrote :

@Joshua, when converting the texts, Inkscape seems to move the text but leave alignment unchanged. It could just leave it in place and not change the alignment.

I haven't tested this in a while, but last time I checked, pressing the 'Left align' button in GUI fixes the issue. The sed script just does the equivalent from the command line. Not sure what SVG version that is, it is based on comparing the Inkscape output in center & left align.

Revision history for this message
Joshua Gitlin (jgitlin) wrote :

@Petteri Thanks, I'll play with the sed scripts you gave. Were they a reliable workaround?

As for the version, all I meant was, do you run the Inkscape command inkscapeFlowtextToTextArgs first and THEN the sed scripts or vise-versa? I assume the sed scripts have to be run first which is why I was confused.

Revision history for this message
Petteri Aimonen (jpa-lp) wrote :

@Joshua, first the inkscape command, then the sed script.

This is the script I use, but comments are unfortunately in Finnish:
http://kapsi.fi/~jpa/stuff/other/convert_to_png.sh

Been reliable with the images I use it with, but it's a crude hack anyway.

Revision history for this message
Bertrand G (berteh) wrote :

confirmed in 0.91pre2 r

using text > convert to text leads to wrong computation of position of resulting text element. It's x should take into account horizontal alignement of original text.

(thanks Petteri for script, it's a usable workaround)

Revision history for this message
Hachmann (marenhachmann) wrote :

Still present in Inkscape 0.92.1 (and 0.91)

Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/issues/2016
Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.