Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xfq opened this issue Oct 17, 2021 · 14 comments
Labels
doc:clreq Used for gap analysis (only) to indicate target document. gap The first comment in this issue is read by the gap-analysis document. i:spacing Text spacing l:zh Chinese p:advanced s:hani Chinese script x:blink Blink needs to fix this. x:clreq This affects the clreq group of languages. x:gecko Gecko needs to fix this. x:jpan This affects the jlreq group of languages. x:webkit WebKit needs to fix this.

Comments

@xfq
Copy link
Member

xfq commented Oct 17, 2021

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 xfq added gap The first comment in this issue is read by the gap-analysis document. doc:clreq Used for gap analysis (only) to indicate target document. p:advanced i:spacing Text spacing labels Oct 17, 2021
@xfq
Copy link
Member Author

xfq commented Oct 17, 2021

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

This comment has been minimized.

@macnmm
Copy link

macnmm commented Oct 18, 2021

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

This comment has been minimized.

@r12a

This comment has been minimized.

@r12a
Copy link
Contributor

r12a commented Oct 19, 2021

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

This comment has been minimized.

@xfq

This comment has been minimized.

@xfq
Copy link
Member Author

xfq commented Oct 20, 2021

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?

@r12a r12a added x:blink Blink needs to fix this. x:clreq This affects the clreq group of languages. x:gecko Gecko needs to fix this. x:jpan This affects the jlreq group of languages. x:webkit WebKit needs to fix this. labels Oct 20, 2021
@xfq
Copy link
Member Author

xfq commented Mar 27, 2023

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

@xfq
Copy link
Member Author

xfq commented Oct 16, 2023

Added a link to another Chromium issue.

@xfq
Copy link
Member Author

xfq commented Oct 16, 2023

Added a link to another WebKit issue.

@r12a r12a moved this to Browser bug raised in Gap-analysis pipeline Jun 20, 2024
@r12a r12a added the s:hani Chinese script label Jun 29, 2024
@xfq
Copy link
Member Author

xfq commented Jul 1, 2024

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

@xfq
Copy link
Member Author

xfq commented Dec 19, 2024

Safari added support for the text-autospace property in Technology Preview 210: https://webkit.org/blog/16406/release-notes-for-safari-technology-preview-210/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc:clreq Used for gap analysis (only) to indicate target document. gap The first comment in this issue is read by the gap-analysis document. i:spacing Text spacing l:zh Chinese p:advanced s:hani Chinese script x:blink Blink needs to fix this. x:clreq This affects the clreq group of languages. x:gecko Gecko needs to fix this. x:jpan This affects the jlreq group of languages. x:webkit WebKit needs to fix this.
Projects
Status: Browser bug raised
Development

No branches or pull requests

3 participants