Bug 177345

Summary: [Regression] Webkit "-apple-system" font fallback token handles font weights of PingFang incorrectly.
Product: WebKit Reporter: Shiki Suen <shikisuen>
Component: WebKit2Assignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Critical CC: achristensen, buildbot, commit-queue, ddkilzer, dino, dongyuan_liu, jonlee, mmaxfield, shikisuen, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: macOS 10.13   
Attachments:
Description Flags
macOS-Safari-PingFang-FakeBold-Issue-Screenshot
none
iOS-Safari-PingFang-FakeBold-Issue-Screenshot
none
Patch
none
Patch none

Shiki Suen
Reported 2017-09-21 23:50:33 PDT
Created attachment 321520 [details] macOS-Safari-PingFang-FakeBold-Issue-Screenshot This bug report was sent to Apple Bug Reporter (#33333584) on on July 15, 2017 and was informed on July 24 that "Engineering has determined that your bug report is a duplicate of another issue and will be closed." However, this issue, till now, is still left unresolved and affects all applications on macOS and iOS that relies on the Safari 11 Webkit API when "-apple-system" is used in CSS font fallback. These are new regressions found in macOS 10.13 and iOS 11 since Developer Beta 3 till GM Builds regarding how webkit handles the font weights of PingFang typeface. See "Steps to Reproduce" below. The reason is that a virtually bolded CJK font looks extremely terrible, definitely disobeying what the font designers really want to see. I posted some attachments here for your reference. Steps to Reproduce: 1. In occasions that the Safari (or any app that relies on the system built-in webkit) reads a western font with Bold weight, when the font falls back to PingFang, it shows virtually bolded font in lieu of what previously done (i.e. PingFang Semibold). 2. To cope with what I described above, I extracted all six PingFang Semibold files and made a doppelgänger set of them (renamed as PingFang bold) and tested this issue again. Now I found that only the wildcard font-fallback token "-apple-system" triggers this issue. Expected Results: Either use PingFang Semibold (like what iOS and macOS previously did), OR ask DynaComware to make the real Bold (and possibly Heavy) weight(s) of this font family. Observed Results: The virtually bolded PingFang family looks extremely terrible, definitely disobeying what the font designers really want to see. I posted some attachments here for your reference. Version: Safari 11.0-13604.1.28.2 and 11.0 (13604.1.38.1.6) Notes: I feel that no one in Webkit team wants to solve this issue quickly, but I still have to post it here. Configuration: macOS 10.13 Developer Beta 3 * GM Build and iOS 11 Developer Beta 3 & GM Build, running on MacBook Late 2016 TouchBar model (13 inch) and iPhone 6s.
Attachments
macOS-Safari-PingFang-FakeBold-Issue-Screenshot (869.65 KB, image/png)
2017-09-21 23:50 PDT, Shiki Suen
no flags
iOS-Safari-PingFang-FakeBold-Issue-Screenshot (511.06 KB, image/png)
2017-09-21 23:51 PDT, Shiki Suen
no flags
Patch (1.98 KB, patch)
2017-10-12 18:34 PDT, Myles C. Maxfield
no flags
Patch (4.46 KB, patch)
2017-10-13 13:54 PDT, Myles C. Maxfield
no flags
Shiki Suen
Comment 1 2017-09-21 23:51:32 PDT
Created attachment 321521 [details] iOS-Safari-PingFang-FakeBold-Issue-Screenshot
Alexey Proskuryakov
Comment 2 2017-09-22 11:19:02 PDT
Shiki Suen
Comment 3 2017-09-22 11:24:35 PDT
(In reply to Alexey Proskuryakov from comment #2) > rdar://problem/32975942 So someone reported this earlier than what I did, proving that there may be a reason why this issue is not wanted to be solved on time.
Myles C. Maxfield
Comment 4 2017-10-12 18:34:35 PDT
Build Bot
Comment 5 2017-10-12 18:36:17 PDT
Attachment 323618 [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 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Myles C. Maxfield
Comment 6 2017-10-12 18:45:20 PDT
*** Bug 177683 has been marked as a duplicate of this bug. ***
Myles C. Maxfield
Comment 7 2017-10-13 13:54:26 PDT
WebKit Commit Bot
Comment 8 2017-10-17 17:34:27 PDT
Comment on attachment 323740 [details] Patch Clearing flags on attachment: 323740 Committed r223589: <https://trac.webkit.org/changeset/223589>
WebKit Commit Bot
Comment 9 2017-10-17 17:34:28 PDT
All reviewed patches have been landed. Closing bug.
Shiki Suen
Comment 10 2017-10-18 15:03:46 PDT
I see the Safari Developer Preview Release 42 (Safari 11.1, WebKit 13605.1.10) does not have this bug fixed. Will this be fixed in macOS 10.12.1 and the next major iOS release?
David Kilzer (:ddkilzer)
Comment 11 2017-10-19 04:40:36 PDT
(In reply to Shiki Suen from comment #10) > I see the Safari Developer Preview Release 42 (Safari 11.1, WebKit > 13605.1.10) does not have this bug fixed. I believe this fix landed after we branched for STP 42. You can check the revision range in the STP 42 release notes. > Will this be fixed in macOS > 10.12.1 and the next major iOS release? Sorry, we can’t talk about the specifics of upcoming releases.
Alex Christensen
Comment 12 2017-10-20 23:10:11 PDT
I think the test was checked into the wrong directory. Instead of putting it in LayoutTests/fast/text/system-ui-chinese-bold-fallback.html it was checked into fast/text/system-ui-chinese-bold-fallback.html
David Kilzer (:ddkilzer)
Comment 13 2017-10-24 11:23:17 PDT
(In reply to Alex Christensen from comment #12) > I think the test was checked into the wrong directory. Instead of putting > it in LayoutTests/fast/text/system-ui-chinese-bold-fallback.html it was > checked into fast/text/system-ui-chinese-bold-fallback.html Fixed in r223901: <https://trac.webkit.org/changeset/223901>
Note You need to log in before you can comment on or make changes to this bug.