Bug 220536

Summary: Multi-codepoint CJK grapheme clusters are not oriented correctly in vertical writing mode
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: lmoura, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=220680
Attachments:
Description Flags
Patch zalan: review+

Description Myles C. Maxfield 2021-01-12 01:01:05 PST
Multi-codepoint CJK grapheme clusters are not oriented correctly in vertical writing mode
Comment 1 Myles C. Maxfield 2021-01-12 01:03:01 PST
Created attachment 417438 [details]
Patch
Comment 2 Myles C. Maxfield 2021-01-12 01:03:04 PST
<rdar://problem/70633887>
Comment 3 Myles C. Maxfield 2021-01-12 14:58:04 PST
Investigating the Windows failure now.
Comment 4 Myles C. Maxfield 2021-01-12 16:55:14 PST
Committed r271425: <https://trac.webkit.org/changeset/271425>
Comment 5 Lauro Moura 2021-01-15 08:27:51 PST
GTK/WPE renders the glyph correctly but with a slightly different positioning, ditto for Firefox 85 and Chromium 87. The same occurs for single codepoints.

Does the spec require them to to be layout exactly the same (i.e. single grapheme in vertical and horizontal modes) or it's something open and the test could be tweaked to work in GTK/WPE?
Comment 6 Myles C. Maxfield 2021-01-15 10:20:36 PST
(In reply to Lauro Moura from comment #5)
> GTK/WPE renders the glyph correctly but with a slightly different
> positioning, ditto for Firefox 85 and Chromium 87. The same occurs for
> single codepoints.
> 
> Does the spec require them to to be layout exactly the same (i.e. single
> grapheme in vertical and horizontal modes) or it's something open and the
> test could be tweaked to work in GTK/WPE?

They don’t *have* to be exactly the same. However, the em box is usually a perfect square, so it would be good to at least determine where the offset comes from in GTK/WPE. One would expect that rotating a perfect square by 90deg would lead to an identical rendering.
Comment 7 Lauro Moura 2021-01-15 18:50:19 PST
(In reply to Myles C. Maxfield from comment #6)
> (In reply to Lauro Moura from comment #5)
> > GTK/WPE renders the glyph correctly but with a slightly different
> > positioning, ditto for Firefox 85 and Chromium 87. The same occurs for
> > single codepoints.
> > 
> > Does the spec require them to to be layout exactly the same (i.e. single
> > grapheme in vertical and horizontal modes) or it's something open and the
> > test could be tweaked to work in GTK/WPE?
> 
> They don’t *have* to be exactly the same. However, the em box is usually a
> perfect square, so it would be good to at least determine where the offset
> comes from in GTK/WPE. One would expect that rotating a perfect square by
> 90deg would lead to an identical rendering.

For GTK/WPE in this test the box seems to be slightly rectangular (111x100) and slightly offset (-6,0 and 0,-6, depending on the orientation). I've opened bug220680 to track it.