Re: [css-font-loading] Document the "font" and "text" parameters for check()

What is the exact format for the "font" parameter to check()?

https://drafts.csswg.org/css-font-loading/#dom-fontfaceset-check-font-text-font
is links to itself in trying to document the "font" parameter.

I tried in Chrome to pass a font name, e.g. "Arial", and got the error
"Could not resolve 'Arial' as a font" in Chrome and "An invalid or illegal
string was specified" in Firefox. To the average developer,
document.fonts.check('Arial') looks like a legitimate syntax, yet fails.
"font" should be documented.

Also, what are the purpose and format of the "text" parameter? Is it to
check if the font face has been loaded for all characters in the "text"
string? I tried

document.fonts.check('1em Arial', '😸')

and got "true", even though that character (U+1F638) was rendered as an
empty square in the browser console.

Received on Sunday, 30 August 2015 10:20:18 UTC