Bug 233447 - Consonant clusters with a visible virama should only have the first consonant+virama highlighted
Summary: Consonant clusters with a visible virama should only have the first consonant...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-23 08:01 PST by r12a
Modified: 2021-12-01 12:21 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description r12a 2021-11-23 08:01:56 PST
When the start of a line contains a 2-consonant cluster that uses a *visible* virama, ::first-letter should highlight only the first consonant+virama. This corresponds to a grapheme cluster, as defined by Unicode.

Tests & results:
Interactive test, When ::first-letter is applied to Devanagari the browser will NOT select a 2-consonant cluster as a unit if the virama is visible
https://github.com/w3c/line_paragraph_tests/issues/68

Interactive test, When ::first-letter is applied to Bengali the browser will only select the first consonant+virama in a cluster if the virama is visible
https://github.com/w3c/line_paragraph_tests/issues/70

Interactive test: When ::first-letter is applied to Tamil the browser will only select the first consonant+virama in a cluster if the virama is visible	
https://github.com/w3c/line_paragraph_tests/issues/71


For Devanagari and Bengali, Gecko only highlights the initial character+virama, whereas Blink, and Webkit select all clusters as a single unit, whether or not they are conjuncts or are rendered with a visible virama.

For Tamil, all browsers select only the first grapheme cluster (as expected).

WebKit browsers should not select the full consonant cluster if the virama is showing.
Comment 1 r12a 2021-11-23 08:03:41 PST
For additional background information, see https://www.w3.org/International/questions/qa-indic-graphemes.en
Comment 2 Radar WebKit Bug Importer 2021-11-30 08:02:20 PST
<rdar://problem/85865506>
Comment 3 r12a 2021-12-01 07:54:16 PST
There's a bug report for Firefox at https://bugzilla.mozilla.org/show_bug.cgi?id=1742626 which, though not exactly the same problem, contains a lot of useful discussion around the general problem of correctly segmenting clusters with viramas.
Comment 4 Myles C. Maxfield 2021-12-01 12:21:00 PST
Cool, thanks for the link.