w3c / clreq

Requirements for Chinese Text Layout
https://www.w3.org/International/clreq/
Other
719 stars 61 forks source link

Space between characters after joining two lines #293

Open xfq opened 4 years ago

xfq commented 4 years ago

Background of this issue

Something like the following paragraph in an HTML file:

Here is an English paragraph
that is broken into multiple lines
in the source code so that it can
more easily read in a text editor.

will become:

Here is an English paragraph that is broken into multiple lines in the source code so that it can be more easily read in a text editor.

when rendered in a web browser, i.e., lines are joined and one space is added between two lines.

However, in CJK text (except Hangul), the spaces are not added. For example:

这个段落比较长,
用一行写不行。最好
用三行写。

becomes:

这个段落比较长,用一行写不行。最好用三行写。

when rendered in a web browser, i.e., there is not space after and .

Question

The CSS Working Group would like to know which characters should not have spaces around them when joining lines.

Here is the current list, categorized using Unicode blocks: https://drafts.csswg.org/css-text-3/#space-discard-set

The interesting questions remaining are:

Unlike fantasai, I'm leaning towards not having spaces for all three categories above. WDYT? @w3c/chinese-layout-req-contributors


See also (CSSWG issues)

upsuper commented 4 years ago

I tend to think spaces between bopomofo should not be discarded, because similar to pinyin, there seem to be spaces to break words or characters. However, I haven't ever seen any complete sentence written in just bopomofo, so I can be wrong about how it's actually used.

Probably people from Taiwan should confirm.

r12a commented 4 years ago

At https://r12a.github.io/scripts/bopomofo/ontheweb#mixedtext you can see bopomofo words mixed into Chinese without spaces being used.

At https://r12a.github.io/scripts/bopomofo/ontheweb#lighttone you can see a whole paragraph in bopomofo, which uses spaces between words. See also http://uncyclopedia.tw/wiki/%E3%84%93%E3%84%A8%CB%8B_%E3%84%A7%E3%84%A3_%E3%84%A8%E3%84%A3%CB%8A

I suspect that its a question of which is the dominant writing style. Is this bopomofo only, or is this chinese that includes bits of bopomofo.

upsuper commented 4 years ago

I wouldn't take uncyclopedia as serious source of reference :)

But yes, when it's mixed with Chinese characters, it should probably have whitespace removed.

I somehow recall that the rule had something like if one side is Chinese and the other side is some set of characters, then eliminate the whitespace. This kind of thing can probably be applied here as well. But it seems that there is no longer such rule...

bobbytung commented 4 years ago

I’ve mailed this reference to fantasai:

We have made a little progress on Bopomofo layout with OpenType: https://cmex-30.github.io/Bopomofo_on_Web/testpage/index.html and document as attachment for reference:

Quick answer is yes. space is used when Bopomofo is used inline.

In part 4.4, usage of Bopomofo inline layout, to avoid to see two different syllables as one, space in between is necessary.

Sent from my iPhone

Xidorn Quan notifications@github.com 於 2020年4月25日 下午6:25 寫道:  I wouldn't take uncyclopedia as serious source of reference :)

But yes, when it's mixed with Chinese characters, it should probably have whitespace removed.

I somehow recall that the rule had something like if one side is Chinese and the other side is some set, then eliminate the whitespace. This kind of thing can probably be applied here as well. But it seems that there is no longer such rule...

— You are receiving this because you are on a team that was mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

xfq commented 4 years ago

We discussed this issue in a clreq meeting, and our consensus was that Bopomofo should not discard spaces because spaces are sometimes used in Bopomofo-only text.