Created attachment 187268 [details] Sample DOCX file created in MS Word Description: Loading a docx file, loses paragraph properties, including justification and line spacing. Steps to Reproduce: 1. Open DOCX attachment in LibreOffice and export it to PDF. 2. Open DOCX attachment in MS Word and export it to PDF. 3. Compare the results Note: You may need "B Nazanin" font, in which I will add as an attachment later. Actual Results: Justification and line spacing is totally different in LibreOffice with MS Word. Expected Results: Justification and line spacing should be the same as MS Word. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 6f1534940ac12ff8e46f4782e18cfb6cf585da39 CPU threads: 32; OS: Windows 10.0 Build 19044; UI render: default; VCL: win Locale: en-US (en_DE); UI: en-US Calc: threaded
Created attachment 187269 [details] "B Nazanin" font, used in the document
Created attachment 187270 [details] PDF Output created with MS Word
Created attachment 187271 [details] PDF Output created with LibreOffice 7.6 dev master
MS Office has the paragraph with "Kashida" justified settings, whereas LO has it right-aligned. Line spacing setting is the same in both (single line). LO has text not justified, and a thinner line spacing. Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: fc4f7db59152f606b6aa88cf32197700959d0f8b CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Same in 6.0.0.3, but line spacing was respected back in OOo 3.3. Khaled, what do you think?
(In reply to Stéphane Guillou (stragu) from comment #4) > MS Office has the paragraph with "Kashida" justified settings, whereas LO > has it right-aligned. > Line spacing setting is the same in both (single line). > > LO has text not justified, and a thinner line spacing. > > Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community > Build ID: fc4f7db59152f606b6aa88cf32197700959d0f8b > CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 > Locale: en-AU (en_AU.UTF-8); UI: en-US > Calc: threaded > > Same in 6.0.0.3, but line spacing was respected back in OOo 3.3. > > Khaled, what do you think? No idea about the lost justification settings, but the line metrics issue can be explained. For historical reasons, fonts have three sets of line spacing settings. The font has two of them equal to each other (Windows GDI will select one of these, and older versions of LibreOffice got the values from Windows GDI), and the last set has smaller line spacing. We end up using that last set for complicated reasons and we don’t want to touch this code anymore because whatever the way we change it will break some font. We have an escape hatch where we can specify that certain fonts should use the values that Windows GDI uses, so we can do this here. Users should be able to do this yourself from the expert configuration dialog (search for FontsUseWinMetrics), but this is currently broken and works only for fonts already specified in the configuration. I suggest keeping this bug to track the line metrics issue, and open a new one for the lost justification setting.
(In reply to خالد حسني from comment #5) > Users should be > able to do this yourself from the expert configuration dialog (search for > FontsUseWinMetrics), but this is currently broken https://bugs.documentfoundation.org/show_bug.cgi?id=155676
Khaled Hosny committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1263873edf86ce223ee54ecd93297273ac3b0e9f tdf#155297: Use usWinAscent and usWinDescent for B Nazanin font It will be available in 7.6.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.
(In reply to خالد حسني from comment #5) > I suggest keeping this bug to track the line metrics issue, and open a new > one for the lost justification setting. Thanks Khaled, done in bug 155689. I bibisected the line spacing regression down to the 4.1.0.0.beta1 release with the linux-64-releases repo, but not to a precise commit. So not sure about blocking bug 112839?
(In reply to Stéphane Guillou (stragu) from comment #8) > (In reply to خالد حسني from comment #5) > > I suggest keeping this bug to track the line metrics issue, and open a new > > one for the lost justification setting. > > Thanks Khaled, done in bug 155689. > > I bibisected the line spacing regression down to the 4.1.0.0.beta1 release > with the linux-64-releases repo, but not to a precise commit. So not sure > about blocking bug 112839? Originally Windows, Linux, and macOS didn’t all agree on the line spacing, so if you bibisect on Windows you should get different results.