W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2018

Re: [csswg-drafts] [css-text] shaping breaks and typographic characters (#699)

From: r12a via GitHub <sysbot+gh@w3.org>
Date: Tue, 11 Dec 2018 13:30:45 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-446202780-1544535044-sysbot+gh@w3.org>
> Please let me know if this is sufficient.

@fantasai until we find a way forward from where we currently are, i think that it's helpful, thanks.

As @FremyCompany mentioned above, i suspect that this is probably only an issue for colour (although fixing things for colour would be quite useful).

`text-decoration` doesn't seem appropriate for sub-grapheme cluster, and i can't think of a good use case where you'd want to apply a different `font-weight`, `font-style`, `font-family`, and `font-size`. `outline` wouldn’t really be workable.

On the other hand, there are SE Asian scripts, such as Tai Tham and Javanese, that tend to begin new words inside a stack.  If you wanted to apply an underline to a particular word in that case (and maybe they don't use underlining, for this reason?) you might want to underline the stack containing the beginning of the word while actually only putting the span around the word itself.(?) But there are a lot of unknowns there wrt typographic requirements.

Anyway, fwiw, i wrote an interactive, exploratory test page at

Since Chrome & Safari currently separate characters with an element boundary between them, and Edge's behaviour is a little obscure, Firefox is perhaps the most interesting browser to try this in.  I provided some sample text, but you can type in whatever you want. (The samples are quickly thrown together combinations that are common in various scripts.) Some observations include:
1. left-positioned or surrounding single char vowel signs can’t be highlighted
2. you can typically highlight the second grapheme cluster in a conjunct or stack, but to do so you  need to put the span around preceding virama or other character that produces the stack (which is part of the preceding grapheme cluster!)
3. fonts make a difference, eg. noto sans tamil won’t highlight the visible tamil virama (U+0BCD), whereas the serif font will
4. ligatured graphemes do sometimes highlight parts of the ligature, ie. constituent glyphs

GitHub Notification of comment by r12a
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/699#issuecomment-446202780 using your GitHub account
Received on Tuesday, 11 December 2018 13:30:47 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:40 UTC