Re: [csswg-drafts] [css-text-4] Add support for content-detection, phrase-based line breaking (#6730)

(Disclaimer: although I speak Chinese, I am not familiar with Chinese grammar or the style rules of Chinese publishers. These are just my personal experiences and thoughts.)

@r12a said:

> Do you also have examples of Chinese needing to keep together things that are associated with an adjoining word in this way?

One such example would be the [classifier](https://en.wikipedia.org/wiki/Chinese_classifier) and the preceding [numeral](https://en.wikipedia.org/wiki/Chinese_numerals), e.g., in 三双筷子 there should be no line break between these 三 and 双. I think this is true even when the classifier is Western text (like "m" instead of 米 for metre). Although there may be spacing between Chinese and Western text, there should be no line breaks.

There are similar examples in Japanese, like シャツ三枚.

Another example is the perfective-aspect *le* (了), which immediately follows the verb. IMHO when used as an aspect marker, *le* and the preceding verb should not be broken into two lines.

Back to the original discussion, I think whether the result of line breaking is satisfactory is a subjective question, and it is difficult to have a method that works in all cases. We'd better provide a not-too-bad default value and allow developers to customize it (by switching strictness profiles/levels or changing phrase-based line breaking to word-based and modifying it by adding things like `<span class="nowrap">` themselves).

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


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

Received on Tuesday, 15 February 2022 08:20:27 UTC