Bug 119393 - Draw - SVG Export of rotated textbox causes multiple lines of text to be displayed on top of each other.
Summary: Draw - SVG Export of rotated textbox causes multiple lines of text to be disp...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:svg
: 126952 128265 (view as bug list)
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
 
Reported: 2018-08-20 19:50 UTC by Alex
Modified: 2023-11-08 00:51 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example ODG showing what I made and then exported (8.90 KB, application/vnd.oasis.opendocument.graphics)
2018-08-20 19:51 UTC, Alex
Details
Example output with error showing for two textboxes. (11.32 KB, image/svg+xml)
2018-08-20 19:52 UTC, Alex
Details
Example ODG showing a similar example where superscript is used (8.56 KB, application/vnd.oasis.opendocument.graphics)
2018-08-20 19:58 UTC, Alex
Details
Example output with error showing for the superscript case (see comment 3) (12.29 KB, image/svg+xml)
2018-08-20 19:59 UTC, Alex
Details
Misalignment with special characters (20.33 KB, image/svg+xml)
2019-04-17 23:32 UTC, user234683
Details
ODG document with single-line text demonstrating the bug (9.62 KB, application/vnd.oasis.opendocument.graphics)
2020-02-20 09:13 UTC, veltsov@gmail.com
Details
SVG output with single-line text, demonstrating the bug (11.09 KB, image/svg+xml)
2020-02-20 09:14 UTC, veltsov@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2018-08-20 19:50:56 UTC
Description:
A canvas featuring SVG Export of text in a rotated textbox can be created.  When exported as a gif/odg this is saved corerectly. Exporting as svg causes any multiple lines of text in a rotated textbox to be displayed on top of each other.

Steps to Reproduce:
1. Create a draw canvas
2. Create a text box
3. Enter a line of text and shrink box so it wraps to multiple lines
4. Rotate box (e.g. by 90 degrees)
5. Export as svg

Actual Results:
Canvas is exported but all lines of text are displayed on top of each other.

Expected Results:
Canvas is exported with text box and looks as per the canvas in Draw


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Alex 2018-08-20 19:51:31 UTC
Created attachment 144336 [details]
Example ODG showing what I made and then exported
Comment 2 Alex 2018-08-20 19:52:39 UTC
Created attachment 144337 [details]
Example output with error showing for two textboxes.

The bug only seems to happen if the angle of the textbox is >45 degrees.
Comment 3 Alex 2018-08-20 19:58:54 UTC
Created attachment 144338 [details]
Example ODG showing a similar example where superscript is used

Where superscript is used it creates erronious new lines for the text when the textbox is rotated (see example output).
Comment 4 Alex 2018-08-20 19:59:52 UTC
Created attachment 144339 [details]
Example output with error showing for the superscript case (see comment 3)

All of the above was done using Win10 LO6.1.0.3 release
Comment 5 Regina Henschel 2018-08-21 15:48:46 UTC
It is likely the same underlying problem as in bug 119257. The position of the <tspan> elements get a shift, which does not consider, that the parent <text> element gets a "rotate" transformation and that this rotation is done after the positioning of the <tspan> elements. But I do not know, where in the code this is done, to look whether I'm right.
Comment 6 Alex 2018-08-26 10:09:12 UTC
I've retested on LO6.0.3.2 on Ubuntu 18.04 which replicates the bug.
Comment 7 Buovjaga 2018-09-20 10:52:16 UTC
Repro with file.
Already in 5.0. Older versions (4.3 tested) did not yet rotate the text but still managed to overlay it on top of itself.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 05db125c57ea3c8f04a304561209c32cc5c45a67
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on September 17th 2018
Comment 8 user234683 2019-04-17 23:32:07 UTC
Created attachment 150838 [details]
Misalignment with special characters

This also happens when you insert a special character into text. The special character is misaligned, and the rest of the text after the special character is even more misaligned.

It doesn't happen if the special character is copy and pasted. For instance, this text string:

abcdθefgh

will not have the issue when pasting that into a text box, rotating it, and saving as SVG. But it will have the issue if the θ is inserted via the special character dialog.

The more the text is rotated, the more misaligned it will be.
Comment 9 Alex 2019-06-23 13:24:45 UTC
I can still reproduce the original bug in:

Version: 6.3.0.0.beta1 (x64)
Build ID: a187af327633f5f00363be5131bd21a13e0f1a7b
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-GB (en_GB); UI-Language: en-GB
Calc: threaded


Also the special characters pasted (abcdθefgh) are rotated fine but inserted ones are not as per Comment 8.

Thanks for your help!
Comment 10 m_a_riosv 2019-08-16 21:32:24 UTC
*** Bug 126952 has been marked as a duplicate of this bug. ***
Comment 11 nick222 2019-08-17 07:42:49 UTC
Confirm

Xubuntu 19.04-64

LibreOffice 6.3.0.4 ID: 1:6.3.0-0ubuntu0.19.04.1~lo1
Comment 12 Timur 2019-11-22 17:06:10 UTC
*** Bug 128265 has been marked as a duplicate of this bug. ***
Comment 13 veltsov@gmail.com 2020-02-20 09:10:28 UTC
This bug is seen also with a single-line text without any special characters or super/subscripts, if the line includes different fonts.

It is present in all LibreOffice versions I have access to (on Linux)
from

LibreOffice 5.1.6.2 10m0(Build:2)

to

LibreOffice 6.4.0.3 b0a288ab3d2d4774cb44b62f04d5d28733ac6df8

Note: Bug 122203 is possible duplicate of this bug.
Comment 14 veltsov@gmail.com 2020-02-20 09:13:24 UTC
Created attachment 158024 [details]
ODG document with single-line text demonstrating the bug
Comment 15 veltsov@gmail.com 2020-02-20 09:14:18 UTC
Created attachment 158025 [details]
SVG output with single-line text, demonstrating the bug
Comment 16 mmtsuchi 2022-12-13 21:23:43 UTC
Still present in LibreOffice Draw 7.3.7.2
Comment 17 Alex 2023-08-12 18:21:02 UTC
Still Present in:

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 4; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Ubuntu package version: 4:7.5.5-0ubuntu0.23.04.1
Calc: threaded

Thanks
Comment 18 Stéphane Guillou (stragu) 2023-11-08 00:51:51 UTC
same in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 31fb3045dabdb27d913712f3abcade315e3ea9bd
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded