Bug 168251 - Add glyph scaling to paragraph justification
Summary: Add glyph scaling to paragraph justification
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0 target:26.8.0 target:26...
Keywords:
Depends on: 168351 168448
Blocks: Paragraph-Alignment
  Show dependency treegraph
 
Reported: 2025-09-02 09:05 UTC by László Németh
Modified: 2026-04-09 20:01 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
tdf168251_demo.fodt: test document (43.67 KB, application/vnd.oasis.opendocument.text-flat-xml)
2025-09-08 17:49 UTC, László Németh
Details
tdf168251_demo.pdf: PDF export of the previous test document (31.04 KB, application/pdf)
2025-09-08 18:00 UTC, László Németh
Details
maximum_glyph_scaling.gif: GIF animation (scaling values: 100%, 103%, 106%, 110%, 115%, 125%, 200%) (232.98 KB, image/gif)
2025-09-26 15:00 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description László Németh 2025-09-02 09:05:51 UTC
Description:
Minor automatic glyph scaling within a minimum/maximum range can minimize too big word spacing, rivers of justified lines, allowing to typeset narrow columns and more readable text. Combined with custom word spacing and letter spacing, it is the basic tool of DTP software to improve typography and readability.

Note: without optical sizing, e.g. variable fonts with "wdth" axis, the suggested/allowed minimum and maximum glyph scaling only a few percent, because distortion of the glyphs destroys their balanced stroke thickness, i.e. the design of the letters.

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:
See Bug 167648.

See also CSS font-width: the font-stretch property at

https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/#font-stretch-prop

and “Glyph scaling” in Text composition page of Adobe InDesign’s Help:

https://helpx.adobe.com/indesign/using/text-composition.html

More information: R. Schlicht: The microtype package, CTAN:

http://mirrors.ctan.org/macros/latex/contrib/microtype/microtype.pdf
Comment 1 Commit Notification 2025-09-03 13:23:38 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/45ec7bd76196dcc60b4c2db2f6f00623ecbaf5a4

tdf#168251 cui offapi xmloff sw glyph scaling: extend UNO/UX/ODF

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.
Comment 2 László Németh 2025-09-08 17:49:34 UTC
Created attachment 202746 [details]
tdf168251_demo.fodt: test document
Comment 3 László Németh 2025-09-08 18:00:11 UTC
Created attachment 202747 [details]
tdf168251_demo.pdf: PDF export of the previous test document

Note: the +10% letter spacing and glyph scaling (without hyphenation and custom word spacing) is only for demonstration of the working letter spacing and glyph scaling, also their combination.

Line length is ~35 characters, i.e. the minimum value suggested for columns. Using also hyphenation and custom word spacing (and later paragraph-level justification) it's possible to create better paragraph layout with the suggested +3 letter spacing and 103% glyph scaling. Using wdth axis of variable fonts for glyph scaling, i.e. without destroying balanced stroke width and letter design, it's possible to use greater values for glyph scaling.
Comment 4 László Németh 2025-09-08 18:02:15 UTC
Close issue (opening new issues for smaller problems).
Comment 5 László Németh 2025-09-26 15:00:31 UTC
Created attachment 202976 [details]
maximum_glyph_scaling.gif: GIF animation (scaling values: 100%, 103%, 106%, 110%, 115%, 125%, 200%)
Comment 6 Commit Notification 2026-03-12 16:07:59 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7ed8a8ee39951f74e364091fafff20269359ba15

tdf#171161 tdf#168251 sw glyph scaling: fix scale width regression

It will be available in 26.8.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.
Comment 7 Commit Notification 2026-03-13 11:39:22 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/2bf50f714307fba9e8a83e9853ff2ccc192eb335

tdf#171161 tdf#168251 sw glyph scaling: fix scale width regression

It will be available in 26.2.3.

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.
Comment 8 Commit Notification 2026-03-19 03:05:08 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f25371fa95b2c46ff4a73ef6995c341c157e62d4

tdf#169491 tdf#168251 sw glyph scaling: fix all scale width regressions

It will be available in 26.8.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.
Comment 9 Commit Notification 2026-03-19 07:18:37 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-26-2-2":

https://git.libreoffice.org/core/commit/dc5eb87b67012ef873b1ea26bbafc8af1fc39595

tdf#171161 tdf#168251 sw glyph scaling: fix scale width regression

It will be available in 26.2.2.

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.
Comment 10 Commit Notification 2026-03-19 12:28:52 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/9cc36a67a2bd04bca06bc52a77aad403bde008b7

tdf#169491 tdf#168251 sw glyph scaling: fix all scale width regressions

It will be available in 26.2.3.

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.
Comment 11 Commit Notification 2026-03-19 21:33:54 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-26-2-2":

https://git.libreoffice.org/core/commit/5060eb926501378f1b5568f24fd56a757e4101c3

tdf#169491 tdf#168251 sw glyph scaling: fix all scale width regressions

It will be available in 26.2.2.

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.