W3C home > Mailing lists > Public > www-style@w3.org > April 2016

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

From: Geoffrey Sneddon <me@gsnedders.com>
Date: Sun, 3 Apr 2016 23:44:13 +0100
Message-ID: <CAHKdfMg5C0eDDCn7Ke4Kwu_XbkSTayNX=ASN-DEDLBwdA=kK3w@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: "Edward O'Connor" <eoconnor@apple.com>, www-style list <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:38 UTC