This is a follow on to https://ask.libreoffice.org/t/justification-spacing-issues/80948 In this question, OP complains about "excessive" word spacing. Read "excessive" as "professional typographers can provide a better look with narrower spaces and an extra word at end". The complaint is related to the justification algorithm. Here is what I understand about it: - justification is done on a line by line basis - contents for a line is collected (line is initially empty) + add word to line and add its width to current total width + add spaces and add their font-defined width to total width + if new word would overflow allowed paragraph width, stop + final step: expand evenly spaces to fit paragraph width Of course, last "word" may be a portion of one because of hyphenation. It happens quite frequently that, even with hyphenation, spaces are dramatically expanded, resulting in an ugly-looking line. This may be caused by next word being really long, as is the case with URL for instance. Or in tables and multi-column context, even words with "moderate" length can cause the issue because of the narrow width of the column. My suggestion is to modify the final expansion step. - after computing the expansion factor, check it against an "acceptable" upper limit, e.g. ×2 standard space - if space ends up too large, tentatively get next word (or portion of it), and see how spaces should be _shrinked_ to accept it into the line - check the shrink factor against an acceptable lower limit, e.g. ×0.5 standard space (may be too small to be visually nice, so perhaps ×0.75?) - if shrink factor is below the limit, fall back to present justification. These limits should be controlled by user, either as new parameters in Aligment or Text Flow tabs in paragraph style, or (to avoid changing the way styles are presently saved) as parameters in Tools>Options advanced configuration.
Reasonable and seems less comprehensive than suggestions in bug 38159, but I guess could be exactly the same effort and this is simply a dupe. NTL, +1
Reminds me on the lately added word length limit for hyphenation in bug 149248 (implemented by László). Unfortunately (or luckily) we are bound to common rules so text rendered in LibreOffice looks pixel-perfect in other applications. But I can imagine a solution with auto character scaling, as requested in bug 38159, and "expand evenly spaces to fit paragraph width" is actually a duplicate. *** This bug has been marked as a duplicate of bug 38159 ***