Bug 163913 - Implement font-relative before text and after text indentation
Summary: Implement font-relative before text and after text indentation
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: Jonathan Clark
URL:
Whiteboard: target:25.2.0 inReleaseNotes:25.2
Keywords:
Depends on:
Blocks: 80596 83844 Paragraph 164084
  Show dependency treegraph
 
Reported: 2024-11-15 15:35 UTC by Jonathan Clark
Modified: 2024-12-09 07:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Clark 2024-11-15 15:35:40 UTC
Description:
OOXML supports character-based paragraph first line, hanging, before and after text indentation.

Bug 36709 added font-relative unit support for paragraph first line indentation. In order to support OOXML documents better, we should extend that work to include before text and after text indentation.

Steps to Reproduce:
1. Open the paragraph properties dialog
2. Try to set a font-relative before- or after-text indentation

Actual Results:
Font-relative indentation is not applied

Expected Results:
Font-relative indentation should be applied


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d18fbc0c20180f6856e9e47eaa97e3763dd4d8e9
CPU threads: 32; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Eyal Rozenberg 2024-11-19 07:45:19 UTC
> Bug 36709 added font-relative unit support for paragraph first line indentation.

Did it really? I don't see that this works for me. If I set a 1 Ch indentation, and change the paragraph font size, the identation doesn't increase. Style inspector also says nothing about char-relative indentation.
Comment 2 Jonathan Clark 2024-11-19 11:18:57 UTC
(In reply to Eyal Rozenberg from comment #1)
> > Bug 36709 added font-relative unit support for paragraph first line indentation.
> 
> Did it really? I don't see that this works for me. If I set a 1 Ch
> indentation, and change the paragraph font size, the identation doesn't
> increase. Style inspector also says nothing about char-relative indentation.

Yes. Please use ic (from CSS), as noted in bug 36709 comment 42. Bug 163912 tracks the disposition of the previously-implemented constant Ch unit.
Comment 3 Eyal Rozenberg 2024-11-19 21:15:21 UTC
(In reply to Jonathan Clark from comment #2)

Oh, I thought you meant it had been implemented well earlier and you were now working on this. Anyway, sorry, yes, works for me. Definitely support extending this.

There is the question of the "discoverability" of such relative indentation. It is actually quite an important feature, since, using it, one can maintain appropriate relations between the indentations of paragraphs at different list-levels even while their sizes are adjusted. In fact, one might even argue that the default template should use these settings. But UI-wise - there's no hint of the ability to switch between font-relative and absolute indentations.
Comment 4 Commit Notification 2024-11-28 21:11:33 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

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

tdf#163913 Implement font-relative margins

It will be available in 25.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 5 Mike Kaganski 2024-11-29 07:09:13 UTC
(In reply to Eyal Rozenberg from comment #3)
> There is the question of the "discoverability" of such relative indentation.
> It is actually quite an important feature, since, using it, one can maintain
> appropriate relations between the indentations of paragraphs at different
> list-levels even while their sizes are adjusted. In fact, one might even
> argue that the default template should use these settings.

Definitely no. Please no default dependencies on font sizes - that is a nightmare (it may only make some sense for specific cases with grids and very carefully selected fonts and controlled substitutions - i.e., basically in a sterile lab environment).

The proportional dependencies that could be a default at some point must all depend on some absolute measurement (e.g., mm). Otherwise, there would be no way to have a predictable layout. Font metrics of an *unknown* font would change practically every bit of layout.