This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.