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

[css-text] Line breaking should fallback to UAX14 in absence of other rules #5068

Closed
r12a opened this issue May 14, 2020 · 2 comments
Closed
Assignees
Labels
Closed Accepted as Editorial Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-text-3 Current Work i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. Testing Unnecessary Memory aid - issue doesn't require tests Tracked in DoC

Comments

@r12a
Copy link
Contributor

r12a commented May 14, 2020

Moving an old thread on the www-style list to GitHub to keep it visible. Please read that thread before replying here.

The spec defines behaviour for several UAX14 line-break classes, such as IN and PR in CJK text, and WJ, ZW, and GL in general text. But there's no recommendation in the spec (other than a note which simply says that further information can be found for all scripts in UAX14) that says that in the absence of other rules in the spec or in an implementation, then the UAX14 line-break properties should be applied as a fallback.

The i18n WG believes that recommending this (as a fallback only, like the UBA for sorting when no tailoring is available) will:

  1. promote interoperability for the cases not otherwise defined, and
  2. will also encourage implementers to fully implement UAX14 for the non-controversial cases that are currently outstanding (for example, 11047 BRAHMI DANDA should allow a line break after but doesn't in FF).

We encourage tailoring of the rules for particular contexts, and propose this only as a kind of 'safety net'.

@r12a r12a added the i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. label May 14, 2020
@xfq xfq added the css-text-3 Current Work label May 15, 2020
@frivoal
Copy link
Collaborator

frivoal commented May 25, 2020

This wasn't present when the mail thread you referred to was open, but now https://drafts.csswg.org/css-text-3/#text-encoding says:

CSS is built on [UNICODE]. UAs that support Unicode must adhere to all normative requirements of the Unicode Core Standard, except where explicitly overridden by CSS.

This means that UAX14 is to be followed, as much as any other part of unicode is. Most parts of UAX14 are tailorable, which is effectively the same as a "SHOULD" requirement. I don't think we should go any further than that, for the reasons argued by @fantasai in the mail thread (note that it already goes further than what she was willing to accept back then)

In other words, at a normative level, the spec already does what you are requesting.

This should be sufficient grounds to file write tests into wpt (with the "should" flag) and file bugs against browsers when they fail those tests, although we should expect that some of these bugs may be closed as WONTFIX when browsers have a good reason to deviate from UAX14.

That said, when doing this, recognizing @kojiishi's point in the thread about web compat, and @fantasai's point about UAX14 being only a baseline that in many cases ought to be tailored, I would recommend focusing on situations which are known to be problematic, rather than just writing exhaustive checklists for all code points: deviating from UAX14 can be justified for web-compat reasons or because of desirable tailorings, but since browser code was historically not based on UAX14, not all differences are documented, and finding out whether a difference is accidental or intentional can be expensive. Bearing that cost in cases known to be problematic is justified, but starting with an assumption that all divergences are bad is likely to result in a lot more work than actually desirable.

On an editorial level, maybe we can make things a little more obvious. How about rephrasing the note at the end of https://drafts.csswg.org/css-text-3/#line-breaking from:

Further information on line breaking conventions can be found in [JLREQ] and [JIS4051] for Japanese, [CLREQ] and [ZHMARK] for Chinese, and in [UAX14] for all scripts in Unicode. See also the Internationalization Working Group’s Typography Index [TYPOGRAPHY] which includes more information on additional languages.

to

[UAX14] defines a baseline behavior for line breaking for all scripts in Unicode, which is expected to be further tailored. Further information on line breaking conventions can be found in [JLREQ] and [JIS4051] for Japanese, [CLREQ] and [ZHMARK] for Chinese. See also the Internationalization Working Group’s Typography Index [TYPOGRAPHY] which includes more information on additional languages.

@r12a
Copy link
Contributor Author

r12a commented Jun 4, 2020

The i18n WG discussed this during their telecon today, and agreed that we would be satisfied if Florian added the proposed edit. Thanks.

@frivoal frivoal closed this as completed in 9817255 Jun 5, 2020
@frivoal frivoal added Closed Accepted as Editorial Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. Testing Unnecessary Memory aid - issue doesn't require tests and removed Commenter Response Pending labels Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-text-3 Current Work i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. Testing Unnecessary Memory aid - issue doesn't require tests Tracked in DoC
Projects
None yet
Development

No branches or pull requests

4 participants