Bug 57215 - Wrong text rotation in SVG Export (rotated text appears as non-rotated)
Summary: Wrong text rotation in SVG Export (rotated text appears as non-rotated)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.0 all versions
Hardware: x86-64 (AMD64) All
: highest normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.0.0 target:4.4.5
Keywords: bibisectNotNeeded, regression
: 70723 73207 75381 82520 88925 (view as bug list)
Depends on:
Blocks: mab4.3
  Show dependency treegraph
 
Reported: 2012-11-17 02:57 UTC by Sean Max
Modified: 2020-12-01 11:00 UTC (History)
20 users (show)

See Also:
Crash report or crash signature:


Attachments
svg produced -- still have a bug (3.91 KB, image/svg+xml)
2012-12-07 14:57 UTC, Korrawit Pruegsanusak
Details
Not-quite-perfect patch (5.15 KB, patch)
2013-04-30 19:39 UTC, Thorsten Behrens (allotropia)
Details
test .odp file with rotated text (15.36 KB, application/vnd.oasis.opendocument.presentation)
2014-05-13 05:25 UTC, tommy27
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Max 2012-11-17 02:57:16 UTC
Rotated text appears as non-rotated. Tested in both Drawing and Presentation.

System: LO Version 4.0.0.0.alpha0+ (Build ID: 378e43) @ Linux (Kubuntu 12.10).

OBS: LO Version 3.6.2.2 works fine. The exported svg file has the right rotated text.

How to reproduce (LO 4.0.0.0):
1 - Create a new Drawing or Presentation document.
2 - Insert a new text box (F2) and write something in it.
3 - Select the box and Format->Position and Size (F4).
4 - Select tab "Rotation" and change the rotation angle.
5 - Export do SVG.

Result: non-rotated text in the svg file
Comment 1 Korrawit Pruegsanusak 2012-11-17 14:24:27 UTC
Confirm on Windows 7 x64 Home Premium, with build from tinderbox Win-x86@6, pull time 2012-11-16 23:06:35, core: 4767bbb00dc9eacce6f6d60fd4c55107333cee2d

Also confirm as regression, because 3.6 beta 1 works fine.

Change platform to All because it is on Linux (comment 0) and Windows (this comment).

Sean, thanks for reporting this bug! :-)
Comment 2 Not Assigned 2012-12-03 17:01:22 UTC
Horacio Fernandes committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b49ea0c9d24aa48d62590cb3443c3ad4143d2e2f

fdo#57215: Fixed wrong text rotation in SVG Export



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Sean Max 2012-12-03 20:01:14 UTC
I can confirm the proposed patch fixed the problem. Tested in both Drawing and Presentation.

System: Version 4.0.0.0.alpha1+ (Build ID: affd2b5c4fba727c1b119bdcbdb71325c10ef95) @ Linux (Kubuntu 12.10).

Changing status to "Resolved".
Comment 4 Joel Madero 2012-12-03 20:01:58 UTC
Excellent, thanks for marking as FIXED, glad it's solved.


Regards,
Joel
Comment 5 Korrawit Pruegsanusak 2012-12-07 14:56:46 UTC
Horacio Fernandes,

Thanks for the patch! :-) Unfortunately, I tested with 4.0 beta1 and 4.1.0.0.alpha0+ (Build ID: 8e43393c9514f39e6b43e581503b61177a00bd3) on Windows 7 x64, and it still have this bug. (I opened svg with Google Chrome 23, Firefox Aurora 19, and Internet Explorer 9). REOPENing

I will attach the svg produced in next comment.
Comment 6 Korrawit Pruegsanusak 2012-12-07 14:57:42 UTC
Created attachment 71132 [details]
svg produced -- still have a bug
Comment 7 Korrawit Pruegsanusak 2012-12-07 15:00:56 UTC
hmm... or all three browsers on my computer can't open this svg correctly?
Comment 8 Horacio 2012-12-08 18:36:50 UTC
It worked on Gimp and I just assumed it was working in the browsers. Already found the problem and I'll have a new patch soon. Thanks for noticing that!
Comment 9 Michael Meeks 2012-12-17 21:30:15 UTC
Great news Horacio - any progress with the patch ? :-) if it gets in tonight it can be in 4.0 Beta2 - thanks !
Comment 10 Joel Madero 2013-01-11 20:53:21 UTC
@Horacio - any update on this one? I can confirm it's still a problem in 4.1 master
Comment 11 Ruslan Kabatsayev 2013-01-15 20:20:45 UTC
I confirm the bug is present with Version 4.0.0.1+ (Build ID: f3cf01ba35e836ecbef03e8140b8afcbb11fdd4).
BTW, interesting behavior for text in test file and in files I generated:
Not rotated: in Firefox & Inkscape
Rotated: in Geeqie
Comment 12 Ruslan Kabatsayev 2013-01-15 20:27:37 UTC
More apps:
Rotated: gqview, mirage, gimp, gpicview
Not rotated: opera

Not opened at all (black sheet): LibreOffice... i.e. it doesn't open the file it generated...
Comment 13 Regina Henschel 2013-01-15 21:32:29 UTC
The attribute "transform" is in an element "tspan" in the example. But an element "tspan" does not allow an attribute "transform", see list of attributes in http://www.w3.org/TR/SVG/text.html#TSpanElement. It should be on the element "g". The syntax would allow it on the element "text" too, but neither Seamonkey nor Inkscape will rotate the text then.
Comment 14 Rainer Bielefeld Retired 2013-04-16 15:31:38 UTC
Something went wrong here, this one has nothing to do with Bug 63585
Comment 15 Thorsten Behrens (allotropia) 2013-04-30 19:39:57 UTC
Created attachment 78666 [details]
Not-quite-perfect patch

Sticking the transform several levels up doesn't cut it either - see attached patch, which works for one paragraph, but messes up with multiple ones, stacked in y-direction. The absolute positioning of both text and paths breaks down badly here, and would need rather more involved changes in svgwriter.cxx

I'd leave it with the current fix for 4.0.x, which at least on FF displays nicely.
Comment 16 fdes 2013-05-30 20:50:54 UTC
I experienced this bug in LibreOffice Draw 4.0.3.3 (Ubuntu 13.04 @ 64 bit) while trying to export as svg a chart which has been pasted from Calc: the title of the Y axis lost its rotation.
Comment 17 Michael Meeks 2013-06-12 10:40:09 UTC
Thorsten - did you mean to close this issue with that patch pushed ? Given that fix - is this still a regression ? fdes - can you file a new bug for your problem, along with a minimal sample document please ?

Thanks !
Comment 18 fdes 2013-06-15 13:28:46 UTC
Michael, it seems that only Inkscape shows wrong orientation from such a .svg file, so perhaps it is an Inkscape bug.

However LibreOffice Draw has issues opening its .svg files, so I will file a new bug for this.
Comment 19 Thorsten Behrens (allotropia) 2013-06-26 10:42:21 UTC
So, for the while, this seems in limbo - re-assigning to default owner, maybe that gets another volunteer interested. I currently lack the bandwidth to fix it properly, since it would need some rework on how we currently export svg.
Comment 20 Florian Manschwetus 2013-08-09 11:39:04 UTC
I could confirm still there in 4.1.0.4
Comment 21 Reuben Thomas 2013-09-06 11:01:45 UTC
I just came across this bug, which is a particular shame since 4.1 adds hyperlinks to SVG export.

Re. comment 17 "Michael, it seems that only Inkscape shows wrong orientation from such a .svg file, so perhaps it is an Inkscape bug." please let's avoid this mentality. SVG is a standard-defined language, and as pointed out in comment 13, the current output is wrong. Even if all known apps rendered the output correctly, it's a bug and should be fixed (though admittedly in that case the priority would be lower).

Here, Inkscape and current Chrome fail to rotate the text; the fact that Firefox copes is nice for Firefox users, but doesn't make LO's SVG export valid SVG. (Also, the chances are that the problem affects every other WebKit browser too.)
Comment 22 Maxim Monastirsky 2013-10-21 13:38:29 UTC
*** Bug 70723 has been marked as a duplicate of this bug. ***
Comment 23 tommy27 2014-01-02 09:25:42 UTC
*** Bug 73207 has been marked as a duplicate of this bug. ***
Comment 24 Stéphane Guillou (stragu) 2014-02-13 23:00:39 UTC
Moving to mab4.1 (Bug 60270) because:
- 4.0 reached EOL (End Of Life)
- bug confirmed in later version
Comment 25 Luiz Angelo Daros de Luca 2014-02-22 19:51:09 UTC
Still present in  4.2.1.1. Inkscape and IE shows no rotation. I also tried to open it in LO but it is not able to read its own exported svg file.
Comment 26 Stéphane Guillou (stragu) 2014-03-13 01:55:27 UTC
*** Bug 75381 has been marked as a duplicate of this bug. ***
Comment 27 tommy27 2014-05-13 05:25:39 UTC
Created attachment 98959 [details]
test .odp file with rotated text

still reproducible under Win7x64 using 4.2.4.2 and 4.3.0.0.alpha1+
Build ID: a1dd961c3093f5f7624e4d1f2240e9120fd13f23
TinderBox: Win-x86@39, Branch:master, Time: 2014-05-06_11:47:48

I attach a minimal test case and move this to mab4.2 list since 4.1.x is END OF LIFE
Comment 28 Christopher Yeleighton 2014-06-21 13:46:27 UTC
Still in 4.2.5.2 (Linux, x64).
Comment 29 Jacques Guilleron 2014-09-02 21:09:34 UTC
*** Bug 82520 has been marked as a duplicate of this bug. ***
Comment 30 u.fuchs 2014-11-06 17:48:59 UTC
Bug also in 4.3.2.2 /kubuntu
Comment 31 Joel Madero 2014-11-06 17:55:35 UTC
Please don't update version - it's the oldest version that demonstrates the problem, not newest. Thanks
Comment 32 Panagiotis Issaris 2014-11-12 15:04:21 UTC
I'm having the same problem on OS X 10.9.5 with LibreOffice 4.3.2.2.
Comment 33 tommy27 2014-12-08 09:05:01 UTC
still reproducible under Win8.1 x64 using LO 4.3.4.1 and 4.5.0.0.alpha0+
Build ID: 6b096f273ac9d7bbe93d2cb083958b3a04866d73
TinderBox: Win-x86@42, Branch:master, Time: 2014-12-04_22:57:23

moving this to mab4.3 list since 4.2.x is END OF LIFE.

I set status to NEW since there's no assigned developer to it.
Comment 34 Björn Michaelsen 2014-12-18 10:14:05 UTC
(This is an automated message.)

Setting priority to highest as this is a MAB. This is part of an effort to make the importance of MAB reflected in priority too.
Comment 35 Robinson Tryon (qubit) 2015-03-05 18:33:28 UTC
(In reply to Thorsten Behrens from comment #15)
> Sticking the transform several levels up doesn't cut it either - see
> attached patch, which works for one paragraph, but messes up with multiple
> ones, stacked in y-direction. The absolute positioning of both text and
> paths breaks down badly here, and would need rather more involved changes in
> svgwriter.cxx

Sounds like we understand this regression pretty well, so
Whiteboard -> bibisectNotNeeded
Comment 36 bugzilla 2015-03-20 20:15:18 UTC
This bug still present in 4.4.0.3
Comment 37 Christina Rossmanith 2015-04-04 20:32:01 UTC
export correct

Version: 4.5.0.0.alpha0+
Build ID: 63a170d1c9e9628f7707cbbd0628ccc09c3fa236
Locale: C_

maybe fixed by cacc3a0e7f7b04240daf63b45e457428388f4929
    tdf#65788: svg export - put transform attribute into text element
    
    if transform is put into an inner tspan element rotated text isn't rendered
Comment 38 V Stuart Foote 2015-05-29 15:21:01 UTC
*** Bug 88925 has been marked as a duplicate of this bug. ***
Comment 39 V Stuart Foote 2015-05-29 15:23:38 UTC
Confirming Christina's observation, this appears resolved fixed for current builds of master and from 5.0.0beta1

For bug 65788  svg export - put transform attribute into text element
http://cgit.freedesktop.org/libreoffice/core/commit/?id=cacc3a0e7f7b04240daf63b45e457428388f4929
Comment 40 V Stuart Foote 2015-05-29 16:06:34 UTC
(In reply to Christina Rossmanith from comment #37)
> 
> maybe fixed by cacc3a0e7f7b04240daf63b45e457428388f4929
>     tdf#65788: svg export - put transform attribute into text element
>     
>     if transform is put into an inner tspan element rotated text isn't
> rendered

@Christina,  Thanks! 

But, any energy for a backport to 4.4.x?
Comment 41 tommy27 2015-05-29 20:20:20 UTC
nice to know that one of the oldest MAB is gone

+1 for backportRequest:4.4 if technically feasible
Comment 42 Florian Manschwetus 2015-05-30 12:42:37 UTC
I also would like to see this fix asap out here, so please backport to current stable
Comment 43 Thorsten Behrens (allotropia) 2015-05-30 14:11:02 UTC
https://gerrit.libreoffice.org/#/c/15994/
Comment 45 Robinson Tryon (qubit) 2015-12-17 07:01:01 UTC
Migrating Whiteboard tags to Keywords: (bibisectNotNeeded)
[NinjaEdit]
Comment 46 Rambo Rao 2020-12-01 11:00:01 UTC Comment hidden (spam)