Bug 184532

Summary: document.fonts.check isn't work correctly
Product: WebKit Reporter: David <vamnemne>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, cdumez, mmaxfield, rniwa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 11   
Hardware: PC   
OS: Unspecified   
Attachments:
Description Flags
strange result none

Description David 2018-04-12 05:08:53 PDT
Created attachment 337788 [details]
strange result

if you use function  `document.fonts.check` for random font name result will be `true`

document.fonts.check('12px normal ANY_RANDOM_NAME'); // return true O_o

Safari desktop 11-10
Comment 1 Radar WebKit Bug Importer 2018-04-12 07:13:50 PDT
<rdar://problem/39380289>
Comment 2 Ahmad Saleem 2022-08-06 07:16:40 PDT
I am able to reproduce this bug in Safari 15.6 on macOS 12.5 using instructions from Comment 0.

1) On this bug page, open Developer Tools and Console
2) Type - document.fonts.check('12px normal ANY_RANDOM_NAME');
3) Hit Enter and it will show "true"

I also get "true" doing same steps in Firefox Nightly 105 while only Chrome Canary 106 show "false" but this Chrome bug suggests that Chrome behavior is wrong and incorrect as per web-spec:

Link - https://bugs.chromium.org/p/chromium/issues/detail?id=591602

WHATWG Github - https://github.com/w3c/csswg-drafts/issues/5744

Appreciate if someone can comment whether we need to fix this or we can ignore this and ask Chrome to change their behavior. Thanks!
Comment 3 Sam Sneddon [:gsnedders] 2022-12-01 03:15:41 PST

*** This bug has been marked as a duplicate of bug 156035 ***