Dear OASIS ODF TC members, My name is Jonathan Clark. I’m a software developer working for The Document Foundation to improve language support in LibreOffice. Per proposal instructions, I wish to advance the following for in-principle acceptance prior to prototype implementation as a foreign attribute. 1. Summary 1.1. Proposal Summary I propose extending style:paragraph-properties attributes to also accept the font-relative length units ‘em’, ‘ex’, ‘cap’, ‘ch’, ‘ic’, and ‘lh’, as defined in the CSS Values and Units Module Level 4 W3C Working Draft. 1.2. Responsible Application Developer Jonathan Clark, jonathan@libreoffice.org 1.3. Date of Initial Proposal 2024-08-09 2. Use Cases The primary motivating use case is CJK typesetting. CJK writing systems are customarily based on a grid, consisting of approximately-square characters spaced with font-relative uniform advances. In the following text, I will refer to this uniform advance as ‘ic’. Because of this typesetting convention, the most natural way to define indentation for CJK languages is in terms of ‘ic’. By adding ‘ic’ as a supported unit, authors would be able to work directly in this unit, and could modify other paragraph style attributes while preserving the intended indentation. Readers would also be able to view documents with the author-intended indentation, even if the font is substituted with a different font on their system. Furthermore, by including other font-relative CSS length units, the listed benefits would also be available for users of non-CJK languages. 3. Solutions in other standards, specifications and applications 3.1. Standards OOXML gives the ability to specify margins and indentations in an ‘ic’-like unit. The standard does this by providing special attributes for font-relative CJK indentation, in addition to the fixed size versions. For example, the w:firstLine attribute is used to define a fixed-width first-line indentation, while w:firstLineChars is used for CJK. OOXML does not support ‘em’, nor any other font-relative unit. HTML/CSS flexibly exposes this functionality via the ‘ic’ unit, in addition to the other font-relative units mentioned previously. 3.2. Non-Standard Specifications This proposal borrows definitions from CSS Values and Units Module Level 4, available here: https://www.w3.org/TR/css-values-4/#font-relative-lengths At time of writing, this document is a working draft. It has not yet been officially accepted. 3.3. Applications Microsoft Word supports an ‘ic’-like unit via the OOXML attributes mentioned previously. When editing documents, users may enter a length value followed by “ch”. Microsoft Word then internally switches to use these special attributes, without user knowledge. LibreOffice Writer uses the ODF style:auto-text-indent attribute to indicate a hard-coded 2 ‘ic’ first-line indent. This feature serves a frequent use case, but not all cases. Based on public documentation, the Japanese word processing program Ichitaro has support for character column-based indentation at least equivalent to that of Microsoft Word. I have not personally verified this functionality. Based on research and experimentation, Google Docs and Apple Pages do not seem to have any support for ‘ic’-based indentation. 3.4. Interoperability Currently, OOXML documents which use the w:firstLineChars etc. attributes cannot be non-destructively converted to ODF. This proposal would improve conversion between ODF and OOXML. For example, if ODF supported the ‘ic’ unit, the OOXML w:firstLineChars attribute could be converted directly to an equivalent ODF fo:text-indent attribute, and vice-versa. 4. Alternatives I considered the following alternatives prior to writing this proposal: LibreOffice currently exposes a unit called ‘ch’. This unit is hard-coded to a value of 210 twips, and ostensibly exists to ease importing Microsoft Word documents using a specific font and font size. Continuing to use a constant value is a potential alternative, but clearly a poor one. A similar alternative would be to perform online conversion to fixed-length units. This would let authors enter lengths using the ‘ic’ unit, but it would otherwise give a poor user experience. Users would not be able to see the original units they entered, and the values would not be robust against other changes, such as font size changes or the substitution of missing fonts. The final alternative I considered is to adopt the scheme used by OOXML, and expose special variant attributes for font-relative CJK indentation. Since the existing ODF attributes already allow lengths denominated by unit, however, it seems more natural to add new units to the existing unit-supporting attributes. Thank you in advance for your time and consideration. Sincerely, - Jonathan Clark