Created attachment 200262 [details] forum-mso-en-18077_smartJustify.zip: DOCX file, PDFs and overlay images I ran across this justified document that seems to be fairly simple - just using the Times New Roman font. However, our justification (as of 25.8 master) doesn't match the output I got from MS Word. The smart justify seemed to get worse results starting in 24.8. During my bibisect, I focused on the first paragraph of the second page. In MS Word it ends with the single word "Soissons." in a line on its own - but in LO it easily fits on the previous line starting with 24.8 commit 36bfc86e27fa03ee16f87819549ab126c5a68cac Author: László Németh on Tue Dec 19 11:58:40 2023 +0100 tdf#119908 tdf#158776 sw smart justify: shrink only spaces In my PDF comparison, both MS Word 2019 and LO bibisect were running on the same windows machine, so both used the identical Times New Roman font version. (That said, it looks quite different with MS Word 2010 on a different windows box, so it sounds like a bit of a moving target...) Marking as low priority, since this is mainly just submitted for information and not really as a concerned bug report. To understand the contents of the PNG files: - the most useful overlays are prev-import (24.8 oldest) and import (24.8.6) where RED=MS Word 2019 and grayscale is LO. - the import-compare and export-compare overlays didn't need to be included. In these overlays, RED=24.8.6, BLUE=24.8oldest, and grayscale is MSO - so any red showing suggests a regression. Found by Collabora's mso-test
@Justin: many thanks for the report! I think, it will allow to refine the MSO interoperability a lot, e.g. a possible limit on the difference between the space sizes of the consecutive lines (part of the Knuth-Plass algorithm), or the unnecessary +1 space, or some mistake in handling text portions etc.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/529755f0919217a84a12daad0fddfddd1124f0e9 tdf#166113 sw smart justify: adjust algorithm for interoperability It will be available in 26.2.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.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/edb1e8f1a0fca2489b722877917283f616e3acd9 tdf#166113 sw smart justify: adjust algorithm for interoperability It will be available in 25.8.0.0.beta2. 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.
Created attachment 201199 [details] compare.docx: other test document
Created attachment 201200 [details] compare.fodt: flat ODF version of the previous test document with metric-equivalent Liberation Serif
Created attachment 201201 [details] compare_mso.pdf: compare.docx in MS Word
Created attachment 201202 [details] compare_docx_before.pdf: compare.docx in Writer before the recent fixes (always greedy space shrinking)
Created attachment 201203 [details] compare_docx_after.pdf: compare.docx in Writer after the recent fixes (same as in MS Word) (non-greedy space shrinking or expansion)
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/938022c445545a16010951515c88d6c45f138d70 tdf#166113 sw smart justify: fix tdf160170.py regression test It will be available in 26.2.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.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/333d908450a16150bef74cc61ccdae330048746d tdf#166113 sw smart justify: fix tdf160170.py regression test It will be available in 25.8.0.0.beta2. 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.
Fixed for plain text. See Bug 166145 for the remaining possible differences (text span).
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c05bc38067b2ab61ae919fb1fef1381343d03844 tdf#167298 tdf#166113 sw word spacing: add word spacing indicator It will be available in 26.2.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.