Diff
Modified: branches/safari-604-branch/LayoutTests/ChangeLog (223676 => 223677)
--- branches/safari-604-branch/LayoutTests/ChangeLog 2017-10-19 05:15:02 UTC (rev 223676)
+++ branches/safari-604-branch/LayoutTests/ChangeLog 2017-10-19 05:15:05 UTC (rev 223677)
@@ -1,5 +1,19 @@
2017-10-18 Jason Marcell <[email protected]>
+ Cherry-pick r223589. rdar://problem/34771462
+
+ 2017-10-17 Myles C. Maxfield <[email protected]>
+
+ [Regression] Webkit "-apple-system" font fallback token handles font weights of PingFang incorrectly.
+ https://bugs.webkit.org/show_bug.cgi?id=177345
+ <rdar://problem/32975942>
+
+ Reviewed by Jon Lee.
+
+ * fast/text/system-ui-chinese-bold-fallback.html:
+
+2017-10-18 Jason Marcell <[email protected]>
+
Cherry-pick r223580. rdar://problem/34958773
2017-10-16 Andy Estes <[email protected]>
Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (223676 => 223677)
--- branches/safari-604-branch/Source/WebCore/ChangeLog 2017-10-19 05:15:02 UTC (rev 223676)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog 2017-10-19 05:15:05 UTC (rev 223677)
@@ -1,5 +1,30 @@
2017-10-18 Jason Marcell <[email protected]>
+ Cherry-pick r223589. rdar://problem/34771462
+
+ 2017-10-17 Myles C. Maxfield <[email protected]>
+
+ [Regression] Webkit "-apple-system" font fallback token handles font weights of PingFang incorrectly.
+ https://bugs.webkit.org/show_bug.cgi?id=177345
+ <rdar://problem/32975942>
+
+ Reviewed by Jon Lee.
+
+ This bug has a fairly insideous cause. In particular, the system font fallback path follows
+ system conventions, which are not the same as the CSS fallback path. For example, the Chinese
+ fallback of San Francisco weight 600 is Ping Fang weight 500. This doesn't match our
+ assumptions in CSS, because Ping Fang does have a 600 weight, which CSS would think is closer.
+ However, the whole point of system-ui is that it follows the system fallback path, not CSS's.
+ Therefore, falling back from a bold system-ui request to a non-bold fallback font is correct
+ and expected, and we shouldn't synthesize bold in this situation.
+
+ Test: fast/text/system-ui-chinese-bold-fallback.html
+
+ * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
+ (WebCore::FontFamilySpecificationCoreText::fontRanges const):
+
+2017-10-18 Jason Marcell <[email protected]>
+
Cherry-pick r223580. rdar://problem/34958773
2017-10-16 Andy Estes <[email protected]>
Modified: branches/safari-604-branch/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp (223676 => 223677)
--- branches/safari-604-branch/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp 2017-10-19 05:15:02 UTC (rev 223676)
+++ branches/safari-604-branch/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp 2017-10-19 05:15:05 UTC (rev 223677)
@@ -66,7 +66,7 @@
bool syntheticBold, syntheticOblique;
std::tie(syntheticBold, syntheticOblique) = computeNecessarySynthesis(fontForSynthesisComputation.get(), fontDescription).boldObliquePair();
- FontPlatformData fontPlatformData(font.get(), size, syntheticBold, syntheticOblique, fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.textRenderingMode());
+ FontPlatformData fontPlatformData(font.get(), size, false, syntheticOblique, fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.textRenderingMode());
return FontRanges(FontCache::singleton().fontForPlatformData(fontPlatformData));
}
Added: branches/safari-604-branch/fast/text/system-ui-chinese-bold-fallback-expected.html (0 => 223677)
--- branches/safari-604-branch/fast/text/system-ui-chinese-bold-fallback-expected.html (rev 0)
+++ branches/safari-604-branch/fast/text/system-ui-chinese-bold-fallback-expected.html 2017-10-19 05:15:05 UTC (rev 223677)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This makes sure that drawing Chinese characters in a weight 600 system font doesn't cause synthetic bold.
+<div style="font: 600 16px system-ui; font-synthesis: none;">今</div>
+</body>
+</html>
Added: branches/safari-604-branch/fast/text/system-ui-chinese-bold-fallback.html (0 => 223677)
--- branches/safari-604-branch/fast/text/system-ui-chinese-bold-fallback.html (rev 0)
+++ branches/safari-604-branch/fast/text/system-ui-chinese-bold-fallback.html 2017-10-19 05:15:05 UTC (rev 223677)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This makes sure that drawing Chinese characters in a weight 600 system font doesn't cause synthetic bold.
+<div style="font: 600 16px system-ui;">今</div>
+</body>
+</html>