Description: Letter spacing of justified lines minimizes too big word spacing, rivers etc., allowing to typeset narrow columns, like DTP software do. Steps to Reproduce: Create a narrow column with justified text. Actual Results: Too big word spacing, often rivers (overlapping word spacing of consecutive lines). Expected Results: Closer to the desired word spacing, no rivers. Reproducible: Always User Profile Reset: No Additional Info: This is not Character setting→Position→Spacing-→Character spacing, but an useful optimization of justified lines. Minor, invisible changes in letter spacing, e.g. -3%/+3% can result in a much better typography: desired word spacing, less or no rivers.
Created attachment 202096 [details] test document: paragraphs with 0%, 5%, 25% and 100% custom letter spacing Narrow columns without hyphenation to show different custom spacing settings vs extreme word spacing.
Created attachment 202097 [details] PDF export of the test document in the development version of LibreOffice
Created attachment 202105 [details] letter_spacing_demo.odt: demo with different letter spacing settings
Created attachment 202106 [details] PDF export of the previous document (Note: the demo document needs Linux Libertine G font)
Created attachment 202118 [details] letter_spacing_demo.odt: demo with different letter spacing settings (corrected version)
Created attachment 202119 [details] PDF export of the previous document (Note: the demo document needs Linux Libertine G font)
See also inter-character/distribute of CSS (mostly for Asian languages, and without custom control, only enlarging letter spacing on the available extra word spacing): https://www.w3.org/TR/css-text-3/#text-justify
See also “Letter Spacing” in Text composition page of Adobe InDesign’s Help: https://helpx.adobe.com/indesign/using/text-composition.html
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f83a04c51056445bbf947a31c8c1866a5c30bef1 tdf#167648 cui offapi xmloff sw: add DTP-feature maximum letter spacing 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.
Commit description: tdf#167648 cui offapi xmloff sw: add DTP-feature maximum letter spacing Add new paragraph justification option "Maximum letter spacing" to distribute letters on (part of) the available blank area of the justified line instead of overstretching word spacing, like DTP software do. This improves typography a lot, allowing typesetting visually better i.e. more readable paragraphs, minimizing or removing rivers and too big word spacing (which was common in columns or text without hyphenation). * Add spin box to Alignment in paragraph formatting dialog window, (also add spin boxes for future Minimum and the alternative percent-based Desired letter spacing, see CharKerning); For example (only ASCII visualization!), 100% maximum letter spacing adds a space character-width blank space between the characters, including the original space: 0%: Lorem ipsum pellentesque dolores vitae. 100%: L o r e m i p s u m pellentesque dolores vitae. Normal value: 3%-5% (or more for very narrow columns), which means e.g. 1-2 twips (twip = 1/20 pt) letter spacing in a ~12 pt text. Note: resolution of the custom letter spacing is only 1 twip yet. * Store properties in paragraph model: css::style::ParagraphProperties::ParaPropLetterSpacingMaximum css::style::ParagraphProperties::ParaPropLetterSpacingMinimum Note: desired letter spacing is already supported by ODF/UNO, see css::style::CharacterProperties::CharKerning. * Implement visual layout of maximum letter spacing. Note: after the last character of the line, there is an unwanted letter-spacing, yet (which is visible only with big letter-spacing values). * Add ODF import/export (loext:letter-spacing-maximum and loext:letter-spacing-minimum) * Add ODF unit test. Note: hyphenated lines and lines with multiple portions do not yet use custom letter spacing, yet.
Another great feature!
Created attachment 202143 [details] test document: paragraphs with 0%, 5%, 25% and 100% custom letter spacing (fixed version, now with 100% letter spacing instead of 0% in the last paragraph)
(In reply to Adolfo Jayme Barrientos from comment #11) > Another great feature! @Adolfo: thanks for your kind feedback! This feature needs a lot of work, yet (minimum word spacing, adding them on the lines with hyphenation and text portions), but the fist result is really impressive. I'm going to attach a gif animation to show that.
Created attachment 202207 [details] letter_spacing.gif: animation about changing maximum letter spacing
First, thanks Laszlo for putting in the work on this. It's another step in the long path laid out in bug 38159... I was wondering how this would relate to the extra character spacing we can now set. Is the percentage you mention relative to the font size (which is the x-height)? Is it relative to fundamental unit of inter-character horizontal space, that we can't control? Is it relative to fundamental hspace + extr space together? Also, I was wondering if it makes sense for the extra spacing we have now to be defined in absolute rather than relative terms, but perhaps that's a matter for another bug. Another question is about squeezing space rather than adding it. Do you support that, to possibly avoid losing a word on the line? Finally, and this the less-enthusiastic part - let's remember that this should not be overused. Like Laszlo notes - beyond a few percentage points of increase/decrease, the spacing change becomes noticeable and jarring, and itself hurts readability. The really big step would be paragraph-level breaking logic I'm afraid :-(