Description: As the continuation of the previous development, allow DTP-like justification features for text lines with multiple text portions. Steps to Reproduce: 1. Open test documents of Bug 167648 and Bug 168251 2. Select a word in a line, which contains visible letter spacing/glyph scaling and underline it. Actual Results: Custom letter spacing and glyph scaling are disabled in that line. Expected Results: Custom letter spacing and glyph scaling are still enabled in that line. Reproducible: Always User Profile Reset: No Additional Info: See Bug 167648 and Bug 168251 for the original problems.
Created attachment 203646 [details] tdf169168.odt: test document Column 1: custom letter spacing Column 2: custom glyph scaling Column 3: combined custom letter spacing and glyph scaling Paragraph 1 of the sections: single portion line Paragraph 2 of the sections: multi-portion line
Created attachment 203647 [details] tdf169168.pdf: PDF layout in LibreOffice v7.3 (no custom letter spacing and glyph scaling)
Created attachment 203648 [details] tdf169168_new.pdf: PDF layout in LibreOffice master (no custom letter spacing and glyph scaling in multiportion lines)
Created attachment 203649 [details] tdf169168_newer.pdf: PDF layout in LibreOffice master (custom letter spacing and glyph scaling in multiportion lines) Other fixes: removed letter spacing at the end of the lines (including in single portion lines), fixing too small or missing word spacing.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/97f97ba44e6af2be2e94ae26054b060b0303933a tdf#169168 sw letter spacing: extend it for multiportion lines 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#169168 sw letter spacing: extend it for multiportion lines Enable custom letter spacing and glyph scaling for multiportion lines, i.e. lines with emphasized and underlined words, or lines hyphenated automatically or with soft hyphen etc. For this, width of the text portions are modified temporarily according to the actual available blank space of the lines at processing the last text portion. Depending on the filling of the text line with text portions during line breaking, portion width data are changed back and forth. Note: Letter spacing and scaling data are stored in SwLineLayout instead of SwTextPortion. Other fixes and changes: – itrcrsr.cxx: text cursor position follows the custom letter spacing and custom glyph scaling applied in the line; – itradj.cxx: at letter spacing, the enlarged blank space is removed after the last letter in the line, fixing jittering of the right side of the lines. – guess.cxx: fix crashing during typing before a terminating text portion; – portxt.cxx: fix bad letter spacing, when the line contains zero width characters (soft hyphen, zero-width space etc.); – testTdf168351: extend test document, because compression is not applied in the last line any more. Note: this is likely not a problem (in fact, it's the opposite, because filling the last line completely can destroy the clear separation of the paragraphs, especially without first line indent). – testTdf168251 and testTdf168448: adjust the tests according to the fixed line breaking.
Created attachment 203698 [details] tdf169168_new_annotated.pdf: fixed problems 1) enlarged letter spacing was applied at the end of the lines, too (yellow bar). 2) there was no microtypography in lines with multiple text portions (blue circle). 3) Where microtypography was enabled in multiportion lines by accident, the result was completely wrong (red box).