Re: [csswg-drafts] [css-text] Extra spacing between ideographs and non-fullwidth punctuation/symbols (#9479)

Hmm, interesting. Many of the use cases you showed above look like things that belong in a `<code>` element. For those, I'd suggest taking advantage of this spec requirement:
> At element boundaries, the amount of extra spacing introduced between characters is determined by and rendered within the innermost element that contains the boundary.

and doing something like this:
```css
code {
    text-autospace: no-autospace;
    padding: 0 0.125em;
}
```

But not all fit in that pattern.

> 在三亚15℃太冷了!   (`U+2103` instead of `U+00B0` + `U+0043`)

This suggests that:
* maybe we should operate on the NFD form, or
* maybe we should include the [letter-like symbols](https://www.compart.com/en/unicode/block/U+2100) in the definition of [non-ideographic letters](https://drafts.csswg.org/css-text-4/#non-ideographic-letters).

For the rest:
> C#
> C++
> .NET Framework
> 42%
> 1‰

> Should we add a new value `ideograph-symbol`

Maybe? That could be a solution. 

Is this a case of symbols that must always be autospaced (when autospacing is on)? If so, we should probably just do it.

Does it depend on something which the author is aware of, but that the user agent cannot easily infer? if so, a new value `ideograph-symbol` is probably the solution.

Does it depend on whether they're next to a string of non-ideographic letters/numbers? If so, it might suggest we need to treat the as some kind of ambiguous/neutral group, that gets grouped together with a string of non-ideographic letters/numbers if any is there, but doesn't introduce spacing by itself if found without non-ideographic letters/numbers

For example, If `永` represents ideographs, `a` represents non-ideographic letters, + represents neutrals (like `#`, `+`, `%`, `.`, etc), and `_` represents autospacing:
* `永a永` would result in `永_a_永`
* `永+永` would result in `永+永`
* `永+a永` would result in `永_+a_永`
* `永a+永` would result in `永_a+_永`
* `永+a+永` would result in `永_+a+_永`
* `永+永a+永` would result in `永+永_a+_永`

Also, regardless of how we handle that category, as you mentioned that not all symbols would fit into that category, I am a little unsure about how we'd go about maintaining the list of those that do and those that don't.

-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9479#issuecomment-1774309893 using your GitHub account


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

Received on Monday, 23 October 2023 01:52:02 UTC