Bug 125582 - FILEOPEN PPTX follow path text transformation is different in LO and PowerPoint
Summary: FILEOPEN PPTX follow path text transformation is different in LO and PowerPoint
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.1.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0 target:7.2.3
Keywords: filter:pptx
Depends on:
Blocks: OOXML-WordArt
  Show dependency treegraph
 
Reported: 2019-05-29 17:52 UTC by Regina Henschel
Modified: 2022-01-13 11:33 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Exampel ArchDown (63.01 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-05-29 17:52 UTC, Regina Henschel
Details
Example ArchUp (60.24 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-05-29 17:53 UTC, Regina Henschel
Details
Example Circle (61.50 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-05-29 17:53 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2019-05-29 17:52:24 UTC
Created attachment 151764 [details]
Exampel ArchDown

Open one of the attached documents. The first slide contains the text transform object, the second slide contains a screenshot from PowerPoint.

The differences are:
(1) PowerPoint puts the first or last line of the text on the path, LibreOffice puts the middle of the text block on the path.
(2) PowerPoint uses a parallel line to the radius in regard to the circle as alignment reference. LibreOffice uses a line perpendicular to the path through the text reference point as alignment reference.

The OOXML standard has no suitable descriptions for the shape types "textArchUp", "textArchDown", "textCircle" and "textButton". The ODF standard is no help, because it has neither a description, how to render similar text shapes. Therefore I suggest, that LibreOffice should try to render it the same way as PowerPoint.

The way, the reference point of the text is calculated in PowerPoint is crazy. From my investigations I conclude this algorithm, see help lines in the attached files:
(1)Draw a WordArt shape, e.g. width larger than height. Use numbers for position and size.
(2)Draw a (red) ellipse with same position and size.
(3)Mark a (green) point A on the ellipse as position for the handle.
(4)Drag the handle of the WordArt shape to that point.
(5)Draw a circle with the same width and center as the ellipse.
(6)Draw a straight (blue) line from center through handle point A.
(7)Find the intersection of this line with the circle and name it point B.
(8)Draw a vertical straight (black) line through point B.
(9)Find the intersection of this line with the ellipse and name it point C.
That is the reference point for the text.
(10)Draw a straight line parallel to the line from step (6) through point C.
That is the alignment reference for the text lines.
[Depending on handle position it might be necessary to mirror some help lines and points.]

This is a follow-up report to bug 116350, where the import of WortArt shapes were implemented.
Comment 1 Regina Henschel 2019-05-29 17:53:08 UTC
Created attachment 151765 [details]
Example ArchUp
Comment 2 Regina Henschel 2019-05-29 17:53:36 UTC
Created attachment 151766 [details]
Example Circle
Comment 3 Xisco Faulí 2019-05-30 10:30:09 UTC
Reproduced in

Version: 6.3.0.0.alpha1+
Build ID: aa687b22991e6c674b1d8653d52fbe9a50080174
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 4 Regina Henschel 2021-10-17 22:21:23 UTC
Szymon Klos has changed the vertical alignment for textArchUp and textArchDown to "Bottom" in https://git.libreoffice.org/core/+/a643c8353754c6ce8b318e37cbbc60c3425e9d32

I will add the same for textCircle, currently in https://gerrit.libreoffice.org/c/core/+/123726.

That brings rendering nearer to PowerPoint.

There are still problems:
A
LibreOffice considers for vertical alignment the actual bounding rectangle of the characters. PowerPoint considers the total line height including space for descenders, regardless of whether such occur or not. Also handling of line-spacing seems to be different.
B
PowerPoint places the letters without gap, same as in normal text. The letters have additional distances from each other in LibreOffice. ODF has the attribute draw:text-path-mode to distinct these ways from another, but that attribute is not implemented yet. The way PowerPoint writes the text would be the attribute value 'normal', LibreOffice's way the attribute value 'path'.
Comment 5 Commit Notification 2021-10-18 17:14:13 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9142d19ddc751e05041471aa1bbeca2f06729522

tdf#125582 use TextVerticalAlign_BOTTOM for textCircle

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2021-10-19 09:37:50 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/516a4a59b7d16fbd803f55c37c51564f46a29f7d

tdf#125582 use TextVerticalAlign_BOTTOM for textCircle

It will be available in 7.2.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Xisco Faulí 2022-01-13 10:07:28 UTC
Hi Regina,
Should this issue be closed as RESOLVED FIXED ?
Comment 8 Regina Henschel 2022-01-13 11:33:11 UTC
The radial position is correct now. The start of the lines is still not correct, because LibreOffice uses the complete text as block. But I have currently no idea how to fix that. So yes let us close it as "Fixed" and create a new issue, if a user complains about the start of the lines.