https://bugs.documentfoundation.org/show_bug.cgi?id=150670
Bug ID: 150670
Summary: [ENHANCEMENT] Better justification
Product: LibreOffice
Version: 7.3.4.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
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.
--
You are receiving this mail because:
You are the assignee for the bug.