Bug 163912 - Remove static conversion for the ch field unit
Summary: Remove static conversion for the ch field unit
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CJK Measurement-Units Paragraph-Indent
  Show dependency treegraph
 
Reported: 2024-11-15 15:32 UTC by Jonathan Clark
Modified: 2024-11-20 08:47 UTC (History)
1 user (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:32:56 UTC
Description:
Additional context for this bug is provided in bug 36709.

Some office suites provide a ch/char field unit, which allows users to denominate paragraph indentation as the multiple of the width of an ideographic character in the current font. LibreOffice also exposes a ch/char field unit. Unlike other office suites, however, this unit is not relative to the current font. When a value in chars is entered into a metric field, a hard-coded conversion is applied (210 twips ~= the advance of a CJK ideographic character in a 10.5 pt font).

Our hard-coded conversion conflicts with the user expectation that indentation denominated in characters should refer to the characters they are using, rather than the characters in some different font or font size.

Bug 36709 added support for a proper font-relative character-based indentation, using the CSS unit 'ic' rather than 'ch'. We now have the opportunity to mitigate some confusion. At minimum, we should remove the current hard-coded conversion and treat 'ch' as an alias for 'ic' in supported contexts.

Steps to Reproduce:
1. Set the font size for some CJK text to 20
2. Set the first-line indent to '5 ch'
3. Note that the text is offset less than 5 characters
4. Set the font size to 10.5
5. The text is now offset ~5 characters
4. Set the indent to '5 ic'
5. Note that the text is offset 5 characters
6. Increase the font size to 20
7. Note that the text is still offset 5 characters

Actual Results:
The applied indentation for 'ch' is not font-relative

Expected Results:
The applied indentation should be font-relative


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