Bug 146515 - "Use printer metrics for document formatting" not roundtripping through the docx format (causes different kerning between ODT & DOCX of the same file)
Summary: "Use printer metrics for document formatting" not roundtripping through the d...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0 target:7.3.1
Keywords:
Depends on:
Blocks: Kerning
  Show dependency treegraph
 
Reported: 2022-01-01 15:47 UTC by Telesto
Modified: 2022-01-29 16:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (12.69 KB, application/vnd.oasis.opendocument.text)
2022-01-01 15:47 UTC, Telesto
Details
Example file (modified, with negative kerning) (12.37 KB, application/vnd.oasis.opendocument.text)
2022-01-17 15:04 UTC, Telesto
Details
Screencast (538.46 KB, video/mp4)
2022-01-17 15:05 UTC, Telesto
Details
Example file 3 with Calibri (13.38 KB, application/vnd.oasis.opendocument.text)
2022-01-17 15:09 UTC, Telesto
Details
Screencast (432.49 KB, video/mp4)
2022-01-17 15:12 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-01-01 15:47:15 UTC
Description:
Different kerning between ODT & DOCX of the same file

Steps to Reproduce:
1. Open the attached file
2. Set zoom to 217 or 120 (didn't try other variants)
3. Export the ODT to DOCX
4. File reload
5. Reopen ODT as second file
6. Switch back and forward in taskbar between both windows

FWIW: The value of this is documenting number of ways of testing kerning issues. The existence of the problem as such is well-known. 

Actual Results:
Different kerning

Expected Results:
Same


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1bb0e177124d5d6661b72df6c7d848fb23639652
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: threaded
Comment 1 Telesto 2022-01-01 15:47:34 UTC
Created attachment 177231 [details]
Example file
Comment 2 Dieter 2022-01-16 13:34:35 UTC
I confirm it with

Version: 7.2.5.2 (x64) / LibreOffice Community
Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

although it is almost unvisible. Telesto, if you write "The existence of the problem as such is well-known." I don't know why we need a new bug report (don't have time to check for duplicates or rlated bugs). Would be nice, if you could at least refer to some other reports.
Comment 3 Telesto 2022-01-17 15:04:05 UTC
Created attachment 177608 [details]
Example file (modified, with negative kerning)
Comment 4 Telesto 2022-01-17 15:05:16 UTC
Created attachment 177609 [details]
Screencast

The O of LibreOffice moves.. Spacing between O and F is slightly better in DOCX
Also the 'u' of bug
Comment 5 Telesto 2022-01-17 15:09:56 UTC
Created attachment 177610 [details]
Example file 3 with Calibri
Comment 6 Telesto 2022-01-17 15:12:40 UTC
Created attachment 177611 [details]
Screencast

The "Li" & "Off" of LibreOffice and the r of Writer
Comment 7 Telesto 2022-01-17 15:20:58 UTC
@Caolan
This has become nitpick report. With Classic rendering you could easily tell. Currently you have look very closely to see any difference.. 

I don't think it's worth any effort.. However I do find it curious.. ODT/DOC doesn't deviate and renders identical.
Comment 8 Caolán McNamara 2022-01-17 16:57:20 UTC
In the docx use tools, options, writer, compatibility and turn on "Use printer metrics for document formatting" and they should then line up.

In the export and reload as doc case this setting is already on (and so matching the original odt) but in the docx case this is missing so we're missing the docx import and/or export of this feature (assuming docx supports it, which I assume it does) so this one is a file filter issue
Comment 9 Caolán McNamara 2022-01-17 17:22:37 UTC
https://gerrit.libreoffice.org/c/core/+/128510
Comment 10 Commit Notification 2022-01-18 10:01:34 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5d40e80926a309a0765023d0014fda1adce7ad63

tdf#146515 export "Use printer metrics for document formatting" to docx

It will be available in 7.4.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 11 Caolán McNamara 2022-01-18 10:02:00 UTC
done in trunk, backport to 7-3 in gerrit
Comment 12 Commit Notification 2022-01-18 10:27:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/2d80e871034dcab71f6324044ad810e057b185d1

tdf#146515 export "Use printer metrics for document formatting" to docx

It will be available in 7.3.1.

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 13 Commit Notification 2022-01-18 15:04:21 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/531f30b7387e45cc4616a92023fe0a6209f16192

tdf#146515: sw_ooxmlexport4: Add unittest

It will be available in 7.4.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 14 Dieter 2022-01-29 16:25:12 UTC
VERIFIED with

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 651ff4f195804b206941e6316c5120a914d28b6b
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Caolán, thanks for fixing it!