Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[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. Source/WebCore: 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): LayoutTests: * fast/text/system-ui-chinese-bold-fallback.html: Canonical link: https://commits.webkit.org/194649@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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> |