Title: [280201] trunk
- Revision
- 280201
- Author
- mmaxfi...@apple.com
- Date
- 2021-07-22 15:40:20 -0700 (Thu, 22 Jul 2021)
Log Message
[Cocoa] ".SF Arabic" should not be able to be looked up by name (because it is dot-prefixed)
https://bugs.webkit.org/show_bug.cgi?id=228018
<rdar://problem/80691654>
Reviewed by Simon Fraser.
Source/WebCore:
Dot-prefixed font names are not supported. The supported way of using SF Arabic is to use
system-ui with Arabic text. It will fall back to SF Arabic.
Test: fast/text/sf-arabic-lookup-by-name.html
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::platformFontLookupWithFamily): Special case this font name, similar to how
we have other special cases for other dot-prefixed fonts. Ideally we would change this
check to just if the leading character is a dot, but that change would be too scary at
this point in the release cycle.
LayoutTests:
* fast/text/sf-arabic-lookup-by-name-expected.html: Added.
* fast/text/sf-arabic-lookup-by-name.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (280200 => 280201)
--- trunk/LayoutTests/ChangeLog 2021-07-22 22:11:13 UTC (rev 280200)
+++ trunk/LayoutTests/ChangeLog 2021-07-22 22:40:20 UTC (rev 280201)
@@ -1,3 +1,14 @@
+2021-07-22 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [Cocoa] ".SF Arabic" should not be able to be looked up by name (because it is dot-prefixed)
+ https://bugs.webkit.org/show_bug.cgi?id=228018
+ <rdar://problem/80691654>
+
+ Reviewed by Simon Fraser.
+
+ * fast/text/sf-arabic-lookup-by-name-expected.html: Added.
+ * fast/text/sf-arabic-lookup-by-name.html: Added.
+
2021-07-22 Eric Hutchison <ehutchi...@apple.com>
[BigSur Debug] imported/w3c/web-platform-tests/xhr/event-upload-progress-crossorigin.any.worker.html is a flaky failure.
Added: trunk/LayoutTests/fast/text/sf-arabic-lookup-by-name-expected.html (0 => 280201)
--- trunk/LayoutTests/fast/text/sf-arabic-lookup-by-name-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/sf-arabic-lookup-by-name-expected.html 2021-07-22 22:40:20 UTC (rev 280201)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test makes sure that the dot-prefixed SF Arabic cannot be looked up by name.
+<div style="font: 100px 'Geeza Pro';">سیب</div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/text/sf-arabic-lookup-by-name.html (0 => 280201)
--- trunk/LayoutTests/fast/text/sf-arabic-lookup-by-name.html (rev 0)
+++ trunk/LayoutTests/fast/text/sf-arabic-lookup-by-name.html 2021-07-22 22:40:20 UTC (rev 280201)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test makes sure that the dot-prefixed SF Arabic cannot be looked up by name.
+<div style="font: 100px '.SF Arabic', 'Geeza Pro';">سیب</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (280200 => 280201)
--- trunk/Source/WebCore/ChangeLog 2021-07-22 22:11:13 UTC (rev 280200)
+++ trunk/Source/WebCore/ChangeLog 2021-07-22 22:40:20 UTC (rev 280201)
@@ -1,3 +1,22 @@
+2021-07-22 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [Cocoa] ".SF Arabic" should not be able to be looked up by name (because it is dot-prefixed)
+ https://bugs.webkit.org/show_bug.cgi?id=228018
+ <rdar://problem/80691654>
+
+ Reviewed by Simon Fraser.
+
+ Dot-prefixed font names are not supported. The supported way of using SF Arabic is to use
+ system-ui with Arabic text. It will fall back to SF Arabic.
+
+ Test: fast/text/sf-arabic-lookup-by-name.html
+
+ * platform/graphics/cocoa/FontCacheCoreText.cpp:
+ (WebCore::platformFontLookupWithFamily): Special case this font name, similar to how
+ we have other special cases for other dot-prefixed fonts. Ideally we would change this
+ check to just if the leading character is a dot, but that change would be too scary at
+ this point in the release cycle.
+
2021-07-22 Yusuke Suzuki <ysuz...@apple.com>
Rename AtomicHTMLToken to AtomHTMLToken
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (280200 => 280201)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2021-07-22 22:11:13 UTC (rev 280200)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2021-07-22 22:40:20 UTC (rev 280201)
@@ -1110,8 +1110,9 @@
if (equalLettersIgnoringASCIICase(family, ".applesystemuifontserif")
|| equalLettersIgnoringASCIICase(family, ".sf ns mono")
|| equalLettersIgnoringASCIICase(family, ".sf ui mono")
+ || equalLettersIgnoringASCIICase(family, ".sf arabic")
|| equalLettersIgnoringASCIICase(family, ".applesystemuifontrounded")) {
- // If you want to use these fonts, use ui-serif, ui-monospace, and ui-rounded.
+ // If you want to use these fonts, use system-ui, ui-serif, ui-monospace, or ui-rounded.
return { nullptr };
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes