w3c / clreq

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

Lack of support for applying extra spacing between Chinese/Japanese and Western text #401

Open xfq opened 2 years ago

xfq commented 2 years ago

This issue applies to Chinese and Japanese.

In Chinese and Japanese composition, it is usually recommended to apply extra spacing between Chinese/Japanese and Western text to increase the recognition of Western text.

Currently, browsers do not support this feature, so content authors have to work around the problem by adding spaces manually.

See also requirements in Chinese and Japanese.

Specs: ‘text-autospace: ideograph-alpha ideograph-numeric’ in the css-text specification can be used to create 1/4em extra spacing between runs of ideographs and non-ideographic letters/numerals.

Tests & results: Interactive test ‘text-autospace: ideograph-alpha ideograph-numeric’ should create 1/4em extra spacing between runs of ideographs and non-ideographic letters/numerals

Gecko, Blink, and Webkit browsers all fail to add the 1/4em extra spacing between runs of ideographs and non-ideographic letters.

Browser bug reports: GeckoBlink 1Blink 2Webkit 1Webkit 2

Priority: Given that a workaround is possible, though not ideal, this is prioritised as an advanced issue.

xfq commented 2 years ago

The first comment in this issue contains text that will automatically appear in one or more gap-analysis documents as a subsection with the same title as this issue. Any edits made to that comment will be immediately available in the document. Proposals for changes or discussion of the content can be made in comments below this point.

Relevant gap analysis documents include: _ChineseJapanese_

xfq commented 2 years ago

@r12a How to add this to the Gap-analysis pipeline?

macnmm commented 2 years ago

The main problem with the workaround is the lack of control in how the widths of these spaces are adjusted. For Japanese spacing, the space glyph in whatever font is likely too wide and doesn't collapse correctly when the line is compressed. For Korean, the space character is always input for word spaces, but again the width is not correct and not contextually controllable (Latin-K versus K-K can be different).

r12a commented 2 years ago

@r12a How to add this to the Gap-analysis pipeline?

It's already there, but only in the editor's version. You need to publish the doc to /TR using echidna once ready. There should be some instructions somewhere for that – i'll check, because things recently changed when new process was added by webreq.

r12a commented 2 years ago

@xfq Could you add a brief description of what the spec has support for (maybe just one sentence will suffice, but it's good to indicate the basis on which this issue is founded, in case the spec changes).

Also, please (again briefly) describe the results of the test you list.

thanks

r12a commented 2 years ago

Btw, i think this issue probably also applies to Thai and other scripts that don't use space as a word-separator, not just C&J. And you should probably create a stub, pointing here for the Japanese gap-analysis doc, so that we don't end up duplicating work.

xfq commented 2 years ago

@r12a How to add this to the Gap-analysis pipeline?

It's already there, but only in the editor's version. You need to publish the doc to /TR using echidna once ready. There should be some instructions somewhere for that – i'll check, because things recently changed when new process was added by webreq.

To clarify, I mean the pipeline, not the gap-analysis document.

xfq commented 2 years ago

@xfq Could you add a brief description of what the spec has support for (maybe just one sentence will suffice, but it's good to indicate the basis on which this issue is founded, in case the spec changes).

Also, please (again briefly) describe the results of the test you list.

Will do. Thank you.

xfq commented 2 years ago

Btw, i think this issue probably also applies to Thai and other scripts that don't use space as a word-separator, not just C&J. And you should probably create a stub, pointing here for the Japanese gap-analysis doc, so that we don't end up duplicating work.

I did consider Thai at the time of writing, but because Thai do use spaces (although not as a word-separator), I didn’t write it. If you are sure that Thai also has this requirement, I can write it in this issue. Or should I create a sealreq issue?

xfq commented 1 year ago

I updated the links to reflect the refactoring of text-spacing in Feb 2023.

xfq commented 11 months ago

Added a link to another Chromium issue.

xfq commented 11 months ago

Added a link to another WebKit issue.

xfq commented 2 months ago

There is also a proposal in Unicode related to this: v1 v2 v3