Re: [css-font-loading] load, check and testing for character coverage

On Fri, Apr 1, 2016 at 9:56 PM, Simon Fraser <smfr@me.com> wrote:
> I think part of the problem here is that check() is a terrible name for a function, since
> it’s hard to know what the return value means. Currently, it means “font is available or
> additional loads won’t do anything”, but flipping this around allows the return value to mean
> “additional load is required”, so the function could be better named as:
>
> document.fonts.requiresLoad(…)
>
> or
>
> document.fonts.requiresAdditionalLoad(...)
>
> These make it clearer that no additional loads are going to help for a garbage font name.

Very strongly agree that the name is a large part of the trouble, as
what is it checking? I'd guess whether fonts already loaded have all
characters in "text" (it's second arg) from the general behaviour,
which tends towards returning false when no font is loaded.

I presume the ship has long since sailed for renaming it, though… :(

/Geoffrey

Received on Sunday, 3 April 2016 22:44:41 UTC