Bug 136231 - FILEOPEN PPTX: Text layout in text boxes is different in Impress than in PP (PPT is almost fine)
Summary: FILEOPEN PPTX: Text layout in text boxes is different in Impress than in PP (...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0
Keywords: filter:pptx
Depends on:
Blocks: PPTX-Textbox
  Show dependency treegraph
 
Reported: 2020-08-28 14:55 UTC by kan
Modified: 2024-04-26 05:49 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
pptx (176.55 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-08-28 14:55 UTC, kan
Details
comparison gif (305.45 KB, image/gif)
2020-08-28 14:56 UTC, kan
Details
PDF exported in PowerPoint (240.23 KB, application/pdf)
2021-02-14 06:55 UTC, Aron Budea
Details
PDF exported in LO 7.1.0.3 (w Calibri) (106.70 KB, application/pdf)
2021-02-14 06:56 UTC, Aron Budea
Details
PPT saved in PP (241.50 KB, application/vnd.ms-powerpoint)
2021-02-14 07:08 UTC, Aron Budea
Details
AnotherTest-Bad Render in LibreOffice (568.47 KB, application/zip)
2021-11-27 19:06 UTC, kevinpr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kan 2020-08-28 14:55:25 UTC
Created attachment 164812 [details]
pptx

This pptx [originally MSO generated, having Calibri font] has text displayed differently when opened in LO even when substitute fonts [Carlito, since I don't have Calibri] have same metrics. Due to same metrics, it should have been exactly similar, I expected.

See that at the end of one/multiple lines, one/few words either have been pushed to next line or extra words have been included in the line.

I'm uploading this side by side comparison for only few of the slides via gif

Version: 7.0.0.3
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded

more details in discussion at https://ask.libreoffice.org/en/question/261699/powerpoint-compatibility-text-not-displayed-identically-even-when-substitute-fonts-have-same-metrics/
Comment 1 kan 2020-08-28 14:56:03 UTC
Created attachment 164813 [details]
comparison gif
Comment 2 Aron Budea 2021-02-14 06:55:50 UTC
Created attachment 169719 [details]
PDF exported in PowerPoint

This isn't a matter of substituting font, even on the same system with the same fonts the text layout in text boxes is different.
Comment 3 Aron Budea 2021-02-14 06:56:58 UTC
Created attachment 169720 [details]
PDF exported in LO 7.1.0.3 (w Calibri)
Comment 4 Aron Budea 2021-02-14 07:08:57 UTC
Created attachment 169721 [details]
PPT saved in PP

What's interesting is that the PPT of the same presentation is shown almost perfectly identical, except the title on slide 3 (and a small issue on slide 5).
Comment 5 kevinpr 2021-11-27 19:06:40 UTC
Created attachment 176538 [details]
AnotherTest-Bad Render in LibreOffice
Comment 6 kevinpr 2021-11-27 19:08:03 UTC
Tested and confirmed in LibreOffice 7.2.2 vs MSOffice 2019 too, with the creator example, and with other example, attached, created with MSOffice 2016/2019 and opened later in LibreOffice 7.2.2

It's a problem when has to be alligned with images or icons too
Comment 7 Xisco Faulí 2022-05-02 14:03:47 UTC
A new major release of LibreOffice is available since this bug was reported.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 8 Gabor Kelemen (allotropia) 2022-06-23 11:47:41 UTC
Still not the same in:

Version: 7.4.0.0.beta1+ / LibreOffice Community
Build ID: 6ab56a4fc946f6294513f23a3ea47aa0aa154b7d
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

Text on the first slide overlaps the image at the bottom.
Comment 9 Regina Henschel 2022-06-23 12:39:00 UTC
The text is too high because the line spacing is wrong. The pptx-file has multiple 0.8 (in the UI of PP), but in LO it is "single". It should be "proportional 80%".

It is the 'lnSpcReduction' attribute of <a:normAutofit> element in <a:bodyPr> element. In this case lnSpcReduction="20000".

The implementation is missing.
https://opengrok.libreoffice.org/xref/core/oox/inc/drawingml/textbodyproperties.hxx?r=e2169886
The 'TextBodyProperties' struct has no member for it.

https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/textbodypropertiescontext.cxx?r=0feeb94f#169
The case 'A_TOKEN( normAutofit ) does not evaluate the attribute.
Comment 10 Stéphane Guillou (stragu) 2024-04-26 05:49:17 UTC
Based on the obvious overlap issue in the first slide, resolved in:

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

Fixed by:

commit f61ea135430d7b4a1fac7de1e57a1314fbb1b49e
author	Tomaž Vajngerl 	Thu Mar 28 12:30:34 2024 +0900
committer	Tomaž Vajngerl 	Wed Apr 03 04:06:50 2024 +0200
editeng: use text scaling that better mimics MSO text scaling
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165441

(build [52abeff6d5836b29dbefe69f284bbd89f6672ae2] in linux-64-24.8 repo)

Thanks Quikee!