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

@xfq Thanks for the info. I haven't checked with JLREQ folks, but I don't think this is language dependent. If the text is "永永永12%永永永" then I believe Japanese expects spacing after "%" too.

The complexity of handling punctuation and symbols is that it depends on the context. Imagine "永永永12%永永永" and "永永永X%永永永" with the CSS `text-autospace: ideograph-numeric`. Ideally, I hope you agree, we want the spacing after "%" for the first case but not for the second. Doing this requires more context than adjacent two characters, and this could be longer, such as "永永永mininum-maximum%永永永". They could also appear alone, such as when "how many % is this?" ("何%ですか?" in Japanese). Supporting longer context slows down the layout engine severely.

It should be a bit simpler if CSS doesn't distinguish `ideograph-numeric` and `ideograph-alpha`, but even if we unite them, there are always edge cases, similar to the UAX#9 Bidi Algorithm isn't always perfect.

The discussion should move to Unicode once the proposal is accepted, and I hope we can find a good balance of desired results, complexity, and performance there.

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


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

Received on Thursday, 18 January 2024 09:43:10 UTC