Open alolita opened 5 years ago
The example needs to be changed - it doesn't mean anything.
It seems to be a Nepali word meaning 'straight'.
Expected behavior: A span should only select a whole grapheme cluster at a time.
The example in the gap-analysis doc does in fact refer to selection of a whole grapheme cluster. The initial syllable is made up of two grapheme clusters S+virama and T+I. The ga text mentions that in fact the whole syllable is coloured. This appears to be the case in Firefox. In Chrome and Safari, only the first consonant and the virama are coloured, however the virama becomes visible and the conjunct is broken apart.
For educational material, I would often like to be able to select a vowel-sign in order to colour it, so i happen to disagree that spans should only be associated (presumably you mean 'at a minimum') with grapheme clusters. This coincides with other people's wishes for other fonts – for example, i know that the alreq folks would like to be able to highlight individual diacritics.
Add corresponding test for browsers.
There are some tests at https://w3c.github.io/i18n-tests/results/first-letter#devanagari
The example used which is स्तिठड doesn't work. If the maatra (in this case choti "ee" --> कि) is on the left hand side of the cluster, it is still attached to the cluster itself so cannot be selected separately ever. If the maatra (e.g. badi "ee" --> की) which is on the right hand side of the cluster, it cannot be selected separately either. So this maatra selection is not correct behavior. The visual selection is not the same as cluster group at the Unicode layer.
I don't see this as an issue is about selection by using the cursor. I believe that 'selection' above is used in the general sense of 'choose' - ie. by isolating inside a span. You can certainly achieve that quite easily.
There is a CSS issue related to exactly this topic at https://github.com/w3c/csswg-drafts/issues/699. I will add a label to it so that we receive notifications of changes to that issue too.
I also just created an interactive, exploratory test page at https://w3c.github.io/i18n-tests/css-text/shaping/exp-sub-grapheme-highlight-000.html
See my observations at https://github.com/w3c/csswg-drafts/issues/699#issuecomment-446202780
https://w3c.github.io/iip/gap-analysis/deva-gap.html#spanned_conjuncts
The example needs to be changed - it doesn't mean anything.
Fix editing issue: Remove incorrect assumption - "Apparently this requirement is a bit difficult to cater to as it requires the knowledge to be transferred by the font to the rendering engine about which part of the glyph is attributed to which code-point in storage. However, if it can be achieved, nothing like it."
Expected behavior: A span should only select a whole grapheme cluster at a time.
Add: Add corresponding test for browsers. Add reference to the correct behavior.