[csswg-drafts] [css-text] Decimal digit transforms (#9877)

Crissov has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text] Decimal digit transforms ==
Unicode has a character property to record its numeric value. This is mostly used for script-specific decimal digits, but also for precomposed vulgar fractions and other numerals. The relevant character classes are `Nd` _Decimal Number_, `Nl` _Letter Number_ and `No` _Other Number_. 

[Antenna House Formatter](https://www.antenna.co.jp/AHF/help/en/ahf-ext.html#text-transormation) supports a custom property `number-transform`. It does not just change the digit glyph, but the whole number. Besides Japanese-specific `kansuji` keywords, it accordingly accepts `<list-style-type>` as a value (and `<string>`). 

I would like to propose something simpler, i.e. two new keywords – to be bikeshedded – for the `text-transform` property:

- `global-digits`: Use the respective glyph of U+0030…9 (`0`…`9`) for any `Nd` character with an integer Numeric Value of 0, …, 9. Note that `font-variant-numeric` will have an effect on those. 
- `local-digits`: The inverse transformation, using the default digits of the native script derived from the language as returned by `:lang()`. This should also convert digits from other scripts, not just the international “ASCII” ones.  

Vulgar fractions, roman numerals etc. would be unaffected by these transformations. 

`Nd` Ranges 
===========

* U+003x Digit
* U+066x Arabic-Indic Digit
* U+06Fx Extended Arabic-Indic Digit
* U+07Cx Nko Digit
* U+096y Devanagari Digit
* U+09Ey Bengali Digit
* U+0A6y Gurmukhi Digit
* U+0AEy Gujarati Digit
* U+0B6y Oriya Digit
* U+0BEy Tamil Digit
* U+0C6y Telugu Digit
* U+0CEy Kannada Digit
* U+0D6y Malayalam Digit
* U+0DEy Sinhala Lith Digit
* U+0E5x Thai Digit
* U+0EDx Lao Digit
* U+0F2x Tibetan Digit
* U+104x Myanmar Digit
* U+109x Myanmar Shan Digit
* U+17Ex Khmer Digit
* U+181x Mongolian Digit
* U+194y Limbu Digit
* U+19Dx New Tai Lue Digit
* U+1A8x Tai Tham Hora Digit
* U+1B5x Balinese Digit
* U+1BBx Sundanese Digit
* U+1C4x Lepcha Digit
* U+1C5x Ol Chiki Digit
* U+A62x Vai Digit
* U+A8Dx Saurashtra Digit
* U+A90x Kayah Li Digit
* U+A9Dx Javanese Digit
* U+A9Fx Myanmar Tai Laing Digit
* U+AA5x Cham Digit
* U+ABFx Meetei Mayek Digit
* U+FF1x Fullwidth Digit
* U+104Ax Osmanya Digit
* U+10D3x Hanifi Rohingya Digit
* U+1106y Brahmi Digit
* U+110Fx Sora Sompeng Digit
* U+1113y Chakma Digit
* U+111Dx Sharada Digit
* U+112Fx Kudawadi Digit
* U+1145x Newa Digit
* U+114Dx Tirhuta Digit
* U+1165x Modi Digit
* U+116Cx Takri Digit
* U+1173x Ahom Digit
* U+118Ex Warang Citi Digit
* U+1195x Dives Akuru Digit
* U+11C5x Bhaiksuki Digit
* U+11D5x Masaram Gondi Digit
* U+11DAx Gunjala Gondi Digit
* U+16A6x Mro Digit
* U+16ACx Tangsa Digit
* U+16B5x Pahawh Hmong Digit
* U+1E14x Nyiakeng Puachue Hmong Digit
* U+1E2Fx Wancho Digit
* U+1E95x Adlam Digit
* U+1FBFx Segmented Digit
* without Mathematical sets around U+1D7__

_x_ in [0…9], _y_ in [6…F]

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9877 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 30 January 2024 13:36:24 UTC