RESOLVED CONFIGURATION CHANGED Bug 172205
The latest version of Webkit can not correctly rendering 202F in mongolian home page
https://bugs.webkit.org/show_bug.cgi?id=172205
Summary The latest version of Webkit can not correctly rendering 202F in mongolian ho...
SiqinBilige
Reported 2017-05-16 18:37:55 PDT
Created attachment 310341 [details] correct rendering Summary: The latest version of Safari can not correctly display 202F in mongolian home page. The latest version of Webkit can not correctly rendering 202F in mongolian home page Steps to Reproduce: Access mongolian home page http://www.mongolfont.com/mn/document/dj/dj033d.html. Expected Results: see firefox.png. Actual Results: see safari.png Version: macOS 10.12.4 (16E195) Safari バージョン10.1 (12603.1.30.0.34) Notes: Not only safari on mac os, but also safari and webview on iOS. Configuration: All applications based on Webkit. Attachments: 'safari.png' and 'firefox.png' were successfully uploaded.
Attachments
correct rendering (551.52 KB, image/png)
2017-05-16 18:37 PDT, SiqinBilige
no flags
wrong rendering (606.96 KB, image/png)
2017-05-16 18:38 PDT, SiqinBilige
no flags
202F.png (18.50 KB, image/png)
2017-07-05 19:21 PDT, SiqinBilige
no flags
forgive it. (32.77 KB, image/png)
2017-07-05 19:21 PDT, SiqinBilige
no flags
202F_code.png (47.89 KB, image/png)
2017-07-05 19:30 PDT, SiqinBilige
no flags
Small test case (349 bytes, text/html)
2017-07-05 20:31 PDT, Simon Fraser (smfr)
no flags
202F correct rendering in mongolian (114.65 KB, image/png)
2017-07-05 21:08 PDT, SiqinBilige
no flags
WIP (1.48 KB, patch)
2017-07-07 13:16 PDT, Myles C. Maxfield
buildbot: commit-queue-
Archive of layout-test-results from ews124 for ios-simulator-wk2 (1.26 MB, application/zip)
2017-07-07 14:43 PDT, Build Bot
no flags
Fonts (205.75 KB, application/zip)
2017-07-10 14:03 PDT, Myles C. Maxfield
no flags
202f.jpg (47.49 KB, image/jpeg)
2017-12-11 01:55 PST, SiqinBilige
no flags
SiqinBilige
Comment 1 2017-05-16 18:38:25 PDT
Created attachment 310342 [details] wrong rendering
Radar WebKit Bug Importer
Comment 2 2017-05-16 18:41:22 PDT
Simon Fraser (smfr)
Comment 3 2017-05-30 11:34:45 PDT
Did this work in older iOS and macOS Safari versions?
SiqinBilige
Comment 4 2017-07-05 18:24:41 PDT
(In reply to Simon Fraser (smfr) from comment #3) > Did this work in older iOS and macOS Safari versions? Yes.
SiqinBilige
Comment 5 2017-07-05 18:27:40 PDT
(In reply to Simon Fraser (smfr) from comment #3) > Did this work in older iOS and macOS Safari versions? For this reason all browsers on Mac OS X and iOS are broken now.
SiqinBilige
Comment 6 2017-07-05 19:19:57 PDT
This issue maybe related to https://bugs.webkit.org/show_bug.cgi?id=170284. https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/graphics/FontCascade.cpp FontCascade::CodePath FontCascade::characterRangeCodePath(const UChar* characters, unsigned len) See 202F_code.png The 202F and 200C are used as mongolian charators. We must passed it to shaping engine like harfbuzz together with other mongolian charators. See 202F.png
SiqinBilige
Comment 7 2017-07-05 19:21:05 PDT
Created attachment 314677 [details] 202F.png
SiqinBilige
Comment 8 2017-07-05 19:21:21 PDT
Created attachment 314678 [details] forgive it.
SiqinBilige
Comment 9 2017-07-05 19:30:56 PDT
Created attachment 314681 [details] 202F_code.png
SiqinBilige
Comment 10 2017-07-05 20:13:49 PDT
(In reply to SiqinBilige from comment #5) > (In reply to Simon Fraser (smfr) from comment #3) > > Did this work in older iOS and macOS Safari versions? > For this reason all browsers on Mac OS X and iOS are broken now. For this reason Safari on Mac OS X and all browsers on iOS are broken now.
SiqinBilige
Comment 11 2017-07-05 20:20:38 PDT
(In reply to SiqinBilige from comment #6) > This issue maybe related to https://bugs.webkit.org/show_bug.cgi?id=170284. > https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/ > graphics/FontCascade.cpp > FontCascade::CodePath FontCascade::characterRangeCodePath(const UChar* > characters, unsigned len) > See 202F_code.png > > The 202F and 200C are used as mongolian charators. We must passed it to > shaping engine like harfbuzz together with other mongolian charators. > See 202F.png Sorry, the 202F and 200D are used as mongolian charators. Not 200C.
Simon Fraser (smfr)
Comment 12 2017-07-05 20:31:26 PDT
Created attachment 314688 [details] Small test case
SiqinBilige
Comment 13 2017-07-05 20:58:59 PDT
Use this test case please. http://www.mongolfont.com/test/webkit/202F.html The AAT font can download from http://www.mongolfont.com/jAlmas/cms/documents/mongolfont/font/mnglwhiteaat.ttf. If necessary, you can include this font to Webkit test case too.
SiqinBilige
Comment 14 2017-07-05 21:08:48 PDT
Created attachment 314692 [details] 202F correct rendering in mongolian
Myles C. Maxfield
Comment 15 2017-07-06 13:24:46 PDT
Raw CoreText draws this text correctly.
Myles C. Maxfield
Comment 16 2017-07-06 17:34:28 PDT
We're finding that fontForCombiningCharacterSequence() is saying that the font doesn't support U+202F
Myles C. Maxfield
Comment 17 2017-07-06 17:40:38 PDT
This is because we explicitly replace narrowNoBreakSpace with zeroWidthSpace in createAndFillGlyphPage(), and the font doesn't claim to support zeroWidthSpace, so we fall back to Lucida to render the space.
Myles C. Maxfield
Comment 18 2017-07-06 17:42:29 PDT
Commenting out "overwriteCodePoint(narrowNoBreakSpace, zeroWidthSpace);" in overwriteCodePoint() fixes the problem. If you are the creator of this font, you could also work around this problem by modifying the font to support zeroWidthSpace.
Myles C. Maxfield
Comment 19 2017-07-06 17:44:38 PDT
What is the license of mnglwhiteaat.ttf? Is it compatible with the WebKit open source license? https://webkit.org/licensing-webkit/
Myles C. Maxfield
Comment 20 2017-07-06 17:45:08 PDT
(When I say zeroWidthSpace, I mean U+0x200B)
Myles C. Maxfield
Comment 21 2017-07-06 17:45:49 PDT
U+200B
SiqinBilige
Comment 22 2017-07-06 18:39:18 PDT
(In reply to Myles C. Maxfield from comment #19) > What is the license of mnglwhiteaat.ttf? Is it compatible with the WebKit > open source license? https://webkit.org/licensing-webkit/ 1. Because 202F and 200D has different purpose in Mongolian. So we can not simply replace each other. 2. Mongolian do not use 200B. 3. The font licensed under the LGPL. ( Actually, the font which I created it no license at all. you can freely use it. ) If no font, Mongolian language difficult to test. mnglwhiteaat.ttf is for only mongolian(1800-1842). You can download the Universal font ( 1800-10AF which include all mongolian, todo, manchu, xibe, and aligali ). http://www.mongolfont.com/test/webkit/MongolianUniversalTest.ttf. This font licensed under the LGPL too. This font include both 202F and 200D.
SiqinBilige
Comment 23 2017-07-06 18:58:20 PDT
By the way Because the 202F is so problematic in mongolian on all platfoms. So, There is a plan to replace it with U+180F. http://www.unicode.org/L2/L2017/17036-mongolian-suffix.pdf If 180F special in Webkit, I want you to support it early. Thank you.
SiqinBilige
Comment 24 2017-07-06 19:24:43 PDT
(In reply to SiqinBilige from comment #22) >( 1800-10AF which include all mongolian, Sorry, there is a misspelling. 1800-10AF -> 1800-18AF
Myles C. Maxfield
Comment 25 2017-07-07 11:32:34 PDT
(In reply to SiqinBilige from comment #22) > (In reply to Myles C. Maxfield from comment #19) > > What is the license of mnglwhiteaat.ttf? Is it compatible with the WebKit > > open source license? https://webkit.org/licensing-webkit/ > > 1. Because 202F and 200D has different purpose in Mongolian. So we can not > simply replace each other. > 2. Mongolian do not use 200B. > 3. The font licensed under the LGPL. ( Actually, the font which I created it > no license at all. you can freely use it. ) If no font, Mongolian language > difficult to test. mnglwhiteaat.ttf is for only mongolian(1800-1842). You > can download the Universal font ( 1800-10AF which include all mongolian, > todo, manchu, xibe, and aligali ). > > http://www.mongolfont.com/test/webkit/MongolianUniversalTest.ttf. > > This font licensed under the LGPL too. This font include both 202F and 200D. > Actually, the font which I created it no license at all. you can freely use it. Which font did you create?
Myles C. Maxfield
Comment 26 2017-07-07 13:16:12 PDT
Build Bot
Comment 27 2017-07-07 13:19:10 PDT
Attachment 314867 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 1 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alexey Proskuryakov
Comment 28 2017-07-07 13:49:29 PDT
Build Bot
Comment 29 2017-07-07 14:43:49 PDT
Comment on attachment 314867 [details] WIP Attachment 314867 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4072174 New failing tests: fast/text/narrow-non-breaking-space.html
Build Bot
Comment 30 2017-07-07 14:43:51 PDT
Created attachment 314881 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
SiqinBilige
Comment 31 2017-07-07 20:08:48 PDT
> Which font did you create? I created Both mnglwhiteaat.ttf and MongolianUniversalTest.ttf fonts, you can freely use it.
SiqinBilige
Comment 32 2017-07-07 20:18:55 PDT
(In reply to SiqinBilige from comment #31) > > Which font did you create? > > I created Both mnglwhiteaat.ttf and MongolianUniversalTest.ttf fonts, you > can freely use it. It is better to use MongolianUniversalTest.ttf which include full set of 1800-18AF. include 200D and 202F too.
Myles C. Maxfield
Comment 33 2017-07-10 14:03:19 PDT
SiqinBilige
Comment 34 2017-12-11 01:55:01 PST
For your reference, there are two case about usage of 202F in mongolian. 1. the word start with 202F. 2. the word include 202F. (there is no word end with 202F in mongolian) There is a sample. http://www.mongolfont.com/test/firefox/202f.html see 202f.jpg
SiqinBilige
Comment 35 2017-12-11 01:55:36 PST
Created attachment 328956 [details] 202f.jpg
SiqinBilige
Comment 36 2018-01-30 17:23:25 PST
For this reason all browsers on Mac OS X and iOS are broken now. Can anyone fix it ?
SiqinBilige
Comment 37 2018-01-30 17:26:34 PST
(In reply to SiqinBilige from comment #36) > For this reason all browsers on Mac OS X and iOS are broken now. > Can anyone fix it ? For this reason all browsers on iOS and safari on Mac OS X are broken now. Can anyone fix it ?
shrpne
Comment 38 2019-06-07 04:25:04 PDT
Similar issues: https://bugs.webkit.org/show_bug.cgi?id=180744 https://bugs.webkit.org/show_bug.cgi?id=194985 Also want to note, that this problem occurs for all fonts I have tried, including system-ui, serif and sans-serif generic fonts. And here is another test case reproducing no width for 202F: https://jsfiddle.net/3g7yc5nf/1/
felix.hageloh
Comment 39 2020-02-28 07:42:49 PST
French uses 202F as a grouping/thousand separator as well. So this bug essentially breaks Intl.NumberFormat on iOS/macOS Safari when useGrouping is on.
Myles C. Maxfield
Comment 40 2021-07-23 11:54:56 PDT
*** This bug has been marked as a duplicate of bug 215643 ***
Myles C. Maxfield
Comment 41 2021-08-11 00:23:34 PDT
As far as I can tell, the Mongolian samples included here all work now. Can you verify that this is true?
Myles C. Maxfield
Comment 42 2021-08-11 11:58:55 PDT
*** Bug 194985 has been marked as a duplicate of this bug. ***
Myles C. Maxfield
Comment 43 2021-08-11 11:59:38 PDT
(I'm testing on macOS Monterey.)
Note You need to log in before you can comment on or make changes to this bug.