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

@r12a: Thanks for the feedback.

> linguistically, the topic particle actually describes the whole phrase '私の名前', not just 名前. So we should probably define clearly what we mean by 'phrase'.

If we were to define it, I'd like to suggest that the definition of the "Bunsetsu" ("phrase" in Japanese) from [Wikipedia](https://ja.wikipedia.org/wiki/%E6%96%87%E7%AF%80)+Google Translate:
> Bunsetsu is the smallest unit (different from words) that does not become unnatural when words are divided into small pieces

Since it's about "natural" line breaking, which is ambiguous, I think both are correct. Multiple Japanese organizations publish different guidelines, and they may produce different results for the same text. I think it is similar to different organizations may define differently whether a word is a noun or a compound noun.

> I'm curious to understand the application for Thai...

We're still learning them, sorry, not enough details yet, but we hear Thai and Chinese think the current line breaking is sometimes "unnatural" and want more natural one. For example, if you look at the source HTML of the [Apple Thai page](https://www.apple.com/th/), you will find `nowrap`, `&nbsp;`, and `<wbr>` to make "natural" line breaking, for example:
```html
<span class="nowrap">ในคอลเลกชั่น</span> Black&nbsp;Unity&nbsp;ใหม่ <wbr><span class="nowrap">ได้รับแรงบันดาลใจ</span>
```

> Since this mentions non-CJK languages, is there an idea that languages that separate words with spaces will also need this option?

We're still learning them too, but examples from [English Apple Card page](https://www.apple.com/apple-card/#promotion):
```html
For&nbsp;Apple&nbsp;Card eligibility requirements
Get started<br /> with&nbsp;Apple&nbsp;Card.
```
It looks like the page author thinks not breaking after "For" or "with", and before product name, is more natural.

> it may change the 'word' selection behaviour too.

Do you want to select "with Apple Card" as one word?

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


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

Received on Sunday, 30 January 2022 02:20:14 UTC