Bug 235257 - Two bopomofo tone marks are not moved to the correct place in vertical text with a particular bopomofo font
Summary: Two bopomofo tone marks are not moved to the correct place in vertical text w...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL: https://cmex-30.github.io/Bopomofo_on...
Keywords: InRadar
Depends on:
Reported: 2022-01-14 16:53 PST by Myles C. Maxfield
Modified: 2022-02-03 18:53 PST (History)
3 users (show)

See Also:

Reduction (370 bytes, text/html)
2022-01-14 16:56 PST, Myles C. Maxfield
no flags Details
Patch (2.54 KB, patch)
2022-01-16 13:52 PST, Myles C. Maxfield
darin: review+
Details | Formatted Diff | Diff
Needs attribution for font creator (11.19 KB, patch)
2022-02-02 19:32 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch for committing (12.45 KB, patch)
2022-02-03 18:21 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2022-01-14 16:53:19 PST
See https://cmex-30.github.io/Bopomofo_on_Web/testpage/index.html

In the last box, these two characters are not placed correctly:


Compare the positioning to Chrome.
Comment 1 Radar WebKit Bug Importer 2022-01-14 16:54:08 PST
Comment 2 Myles C. Maxfield 2022-01-14 16:56:12 PST
Created attachment 449233 [details]
Comment 3 Myles C. Maxfield 2022-01-14 16:56:28 PST
(The attached reduction needs the custom font from https://cmex-30.github.io/Bopomofo_on_Web/testpage/index.html)
Comment 4 Myles C. Maxfield 2022-01-16 13:11:08 PST
For some reason we're getting two different Font objects in FontCascade::drawGlyphBuffer() which point to the same CTFont
Comment 5 Myles C. Maxfield 2022-01-16 13:15:02 PST
m_font.glyphDataForCharacter() is reporting different Font objects for those characters. They point to the same CTFont though.
Comment 6 Myles C. Maxfield 2022-01-16 13:29:48 PST
I see what's happening. The FontCascade::isCJKIdeographOrSymbol() check in FontCascadeFonts::glyphDataForVariant() is returning true for the modifiers but false for the regular characters.
Comment 7 Myles C. Maxfield 2022-01-16 13:52:26 PST
Created attachment 449287 [details]
Comment 8 Darin Adler 2022-01-16 13:55:21 PST
Comment on attachment 449287 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=449287&action=review

> Source/WebCore/ChangeLog:16
> +        No new tests because this requires a custom font to test.

We need to do something about this; maybe make some more custom fonts for the WebKit test suite. That situation is high risk for the project, I think. I’d even like to see this kind of thing tested in WPT.
Comment 9 Myles C. Maxfield 2022-02-02 19:32:21 PST
Created attachment 450730 [details]
Needs attribution for font creator
Comment 10 Myles C. Maxfield 2022-02-03 18:21:50 PST
Created attachment 450845 [details]
Patch for committing
Comment 11 Myles C. Maxfield 2022-02-03 18:53:23 PST
Committed r289101 (246798@trunk): <https://commits.webkit.org/246798@trunk>