Bug 155707 - Implement justified/justify low/medium/high paragraph alignments
Summary: Implement justified/justify low/medium/high paragraph alignments
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paragraph-Alignment Kashida-Justification
  Show dependency treegraph
 
Reported: 2023-06-06 12:42 UTC by Hossein
Modified: 2023-10-19 08:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX different justify options (12.71 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-06-07 14:45 UTC, Hossein
Details
PDF output using MS Word (74.17 KB, application/pdf)
2023-06-07 14:46 UTC, Hossein
Details
PDF output using LibreOffice 7.6 dev master (45.77 KB, application/pdf)
2023-06-07 14:46 UTC, Hossein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2023-06-06 12:42:01 UTC
Description:
In Microsoft Word, there are 4 options for justified paragraph alignments:
* justified
* justify low
* justify medium
* justify high

In LibreOffice, there is only one, which seems to be similar to justify low. In the above options, no kashida is used for the first option.

Each of the above options are used for a certain purpose, so having all of them is useful to create professional looking documents.
Comment 1 ⁨خالد حسني⁩ 2023-06-06 13:59:31 UTC
Apart from the code side, this would need support from ODF format as well.
Comment 2 Telesto 2023-06-07 02:21:20 UTC
Adding Regina 

(In reply to ⁨خالد حسني⁩ from comment #1)
> Apart from the code side, this would need support from ODF format as well.
Comment 3 Regina Henschel 2023-06-07 13:41:39 UTC
Please provide an docx file with such text.
Comment 4 Hossein 2023-06-07 14:45:51 UTC
Created attachment 187767 [details]
DOCX different justify options

The attachment is a DOCX file containing RTL and LTR paragraphs with different justify options.
Comment 5 Hossein 2023-06-07 14:46:22 UTC
Created attachment 187768 [details]
PDF output using MS Word
Comment 6 Hossein 2023-06-07 14:46:57 UTC
Created attachment 187769 [details]
PDF output using LibreOffice 7.6 dev master
Comment 7 ⁨خالد حسني⁩ 2023-06-07 15:01:26 UTC
From the attached documents, what LibreOffice implements right now is a mixture of “justified” and “justify low”, but we chose automatically depending on the font. It shouldn’t be hard to allow for explicit selection of the mode as well.

The other two modes use different line breaks, so it is an interoperability issue, but to be interoperable we also need to know what algorithm is used to to insert Kashidas. From a quick glance, the “justify medium” seems to be inserting one kashida in each work then justifying the text as usual, and “justify high” seems to be inserting three Kashidas then justifying, but this is only a guess.

What happens with font like Amiri and Noto Nastaliq where inserting Kashida anywhere will sometimes break how the glyphs join?
Comment 8 Hossein 2023-10-19 08:32:17 UTC
(In reply to ⁨خالد حسني⁩ from comment #7)
> What happens with font like Amiri and Noto Nastaliq where inserting Kashida
> anywhere will sometimes break how the glyphs join?
In MS Word, the low/medium/high justification break the glyph join with some calligraphy fonts like Nastaliq, and you have to stick to "justified".