Bug 228018

Summary: [Cocoa] ".SF Arabic" should not be able to be looked up by name (because it is dot-prefixed)
Product: WebKit Reporter: Ebrahim Byagowi <ebrahim>
Component: TextAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: mmaxfield, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Arabic letters aren't connected
none
Patch
none
Patch simon.fraser: review+

Description Ebrahim Byagowi 2021-07-16 01:38:05 PDT
Created attachment 433664 [details]
Arabic letters aren't connected

Steps:
0. Upgrade to macOS Monterey beta.
1.
data:text/html;charset=utf8,<b style="font-family:'.SF Arabic'">سیب
2. Use touchpad pinch to zoom to zoom on the text to show

Actual:
There is a space between Arabic letters

Expected:
To have all letters connected
Comment 1 Ebrahim Byagowi 2021-07-16 02:03:53 PDT
There is a difference between these two,

data:text/html;charset=utf8,<b style="font-family:'.SF Arabic'">سیب

data:text/html;charset=utf8,<b style="font-family:system-ui">سیب

Their fonts are the same but getting bold in different ways, maybe somehow the disconnect letters is because of this
Comment 2 Radar WebKit Bug Importer 2021-07-16 10:30:44 PDT
<rdar://problem/80691654>
Comment 3 Myles C. Maxfield 2021-07-21 13:42:11 PDT
*** Bug 228163 has been marked as a duplicate of this bug. ***
Comment 4 Myles C. Maxfield 2021-07-21 13:44:07 PDT
*** Bug 228163 has been marked as a duplicate of this bug. ***
Comment 5 Myles C. Maxfield 2021-07-21 13:44:12 PDT
Created attachment 433954 [details]
Patch
Comment 6 Myles C. Maxfield 2021-07-21 16:53:46 PDT
Created attachment 433975 [details]
Patch
Comment 7 Simon Fraser (smfr) 2021-07-22 11:18:28 PDT
Comment on attachment 433975 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=433975&action=review

Is it OK to do this on all OS versions?

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1114
> +        || equalLettersIgnoringASCIICase(family, ".sf arabic")) {

I would move this up to below ".sf ui mono"
Comment 8 Myles C. Maxfield 2021-07-22 15:40:28 PDT
Committed r280201 (239889@main): <https://commits.webkit.org/239889@main>
Comment 9 Myles C. Maxfield 2021-07-22 17:49:23 PDT
(In reply to Simon Fraser (smfr) from comment #7)
> Comment on attachment 433975 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=433975&action=review
> 
> Is it OK to do this on all OS versions?

SF Arabic is new to Monterey & iOS 15