RESOLVED FIXED 174418
[HarfBuzz] Decomposed Vietnamese characters are rendered incorrectly
https://bugs.webkit.org/show_bug.cgi?id=174418
Summary [HarfBuzz] Decomposed Vietnamese characters are rendered incorrectly
Fujii Hironori
Reported 2017-07-12 02:40:56 PDT
Created attachment 315220 [details] screenshot [HarfBuzz] Decomposed Vietnamese characters are rendered incorrectly For example, "ể" has two unicode representation "ể" and "ể". https://en.wiktionary.org/wiki/%E1%BB%83 Those characters should be rendered identically.
Attachments
screenshot (12.51 KB, image/png)
2017-07-12 02:40 PDT, Fujii Hironori
no flags
test case (356 bytes, text/html)
2017-07-12 02:41 PDT, Fujii Hironori
no flags
Patch (5.32 KB, patch)
2017-07-12 18:25 PDT, Fujii Hironori
no flags
vietnamese-nfd-actual.png (12.00 KB, image/png)
2017-07-12 18:26 PDT, Fujii Hironori
no flags
vietnamese-nfd-expected.png (13.87 KB, image/png)
2017-07-12 18:26 PDT, Fujii Hironori
no flags
Patch (6.16 KB, patch)
2017-08-15 21:35 PDT, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2017-07-12 02:41:45 PDT
Created attachment 315221 [details] test case
Fujii Hironori
Comment 2 2017-07-12 02:52:37 PDT
HarfBuzzShaper should normalize the input text before shaping. Actually, HarfBuzzShaper::setNormalizedBuffer does the task. https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp?rev=219385#L233 But, this function hasn't called from anywhere since Bug 108077.
Fujii Hironori
Comment 3 2017-07-12 18:25:36 PDT
Fujii Hironori
Comment 4 2017-07-12 18:26:36 PDT
Created attachment 315322 [details] vietnamese-nfd-actual.png
Fujii Hironori
Comment 5 2017-07-12 18:26:54 PDT
Created attachment 315323 [details] vietnamese-nfd-expected.png
Fujii Hironori
Comment 6 2017-07-12 19:40:59 PDT
(In reply to Fujii Hironori from comment #2) > But, this function hasn't called from anywhere since Bug 108077. Not Bug 108077, but Bug 90951.
Fujii Hironori
Comment 7 2017-07-12 19:49:14 PDT
It'd be great help if you can take a glance at my patch and give me your thoughts.
Kenichi Ishibashi
Comment 8 2017-07-12 20:59:17 PDT
The patch looks good to me. Please ask WebKit reviewers for actual review :)
Fujii Hironori
Comment 9 2017-07-12 22:21:26 PDT
It's a great helpful. Thank you so much to have a time to review my patch.
Michael Catanzaro
Comment 10 2017-07-13 18:59:45 PDT
Oh wow, apparently it's font bug week or something! I have not the faintest clue if your patch is right or not. I'm encouraged that it fixes the problem and includes a layout test. I'm also encouraged to see that Kenichi likes your patch. I see that he wrote all this code, so that's good I suppose!
Michael Catanzaro
Comment 11 2017-07-13 19:03:22 PDT
Comment on attachment 315321 [details] Patch I'm giving r+ even though I don't understand the code, because I'm pretty sure we don't have any Igalia reviewers who might understand it. Myles, if you see any reason not to commit this, please say so. I have a suspicion that this commit might affect a lot of test results, so we will need to watch the bots carefully after landing it. So we will have to try landing this another day.
Myles C. Maxfield
Comment 12 2017-07-13 19:38:45 PDT
(In reply to Michael Catanzaro from comment #10) > I have not the faintest clue if your patch is right or not. I'm encouraged > that it fixes the problem and includes a layout test. I'm also encouraged to > see that Kenichi likes your patch. I see that he wrote all this code, so > that's good I suppose! 😁
Michael Catanzaro
Comment 13 2017-07-13 21:01:11 PDT
Comment on attachment 315321 [details] Patch OK, Myles posted a happy emojii, and the tree is back open, so we should be good to cq+ this tomorrow when we're available for watching the bots.
WebKit Commit Bot
Comment 14 2017-07-14 08:54:34 PDT
Comment on attachment 315321 [details] Patch Clearing flags on attachment: 315321 Committed r219504: <http://trac.webkit.org/changeset/219504>
WebKit Commit Bot
Comment 15 2017-07-14 08:54:36 PDT
All reviewed patches have been landed. Closing bug.
Michael Catanzaro
Comment 16 2017-07-14 10:13:03 PDT
Looks like there's no difference in the test results. OK then.
Fujii Hironori
Comment 17 2017-07-14 13:57:56 PDT
Thank you, Michael. I'll keep an eys on it during this weekend. I'll investigate new failures next Tuesday if any. (next Monday is Japan's national holiday)
Michael Catanzaro
Comment 18 2017-07-14 16:44:45 PDT
There were not any new failures!
Michael Catanzaro
Comment 19 2017-08-15 10:12:56 PDT
WebKit Commit Bot
Comment 20 2017-08-15 10:14:11 PDT
Re-opened since this is blocked by bug 175580
Fujii Hironori
Comment 21 2017-08-15 19:57:07 PDT
Thank you for rolling back my change, Michael. I'm sorry for not noticing the regression. normalizeCharacters was using FontCascade::treatAsZeroWidthSpaceInComplexScript while normalizeSpacesAndMirrorChars is using FontCascade::treatAsZeroWidthSpace.
Fujii Hironori
Comment 22 2017-08-15 21:35:16 PDT
Michael Catanzaro
Comment 23 2017-08-15 22:23:11 PDT
Careful, or you'll become a text layout expert! Is this patch ready for review?
Fujii Hironori
Comment 24 2017-08-16 02:35:26 PDT
Comment on attachment 318221 [details] Patch EWS got green. finished testing in my env. It's ready for review now.
WebKit Commit Bot
Comment 25 2017-08-16 09:36:39 PDT
Comment on attachment 318221 [details] Patch Clearing flags on attachment: 318221 Committed r220797: <http://trac.webkit.org/changeset/220797>
WebKit Commit Bot
Comment 26 2017-08-16 09:36:41 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 27 2017-08-16 09:37:16 PDT
Note You need to log in before you can comment on or make changes to this bug.